This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //events - a super-basic Javascript (publish subscribe) pattern | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'tmhOAuth.php'; // Get it from: https://github.com/themattharris/tmhOAuth | |
| // Use the data from http://dev.twitter.com/apps to fill out this info | |
| // notice the slight name difference in the last two items) | |
| $connection = new tmhOAuth(array( | |
| 'consumer_key' => '', | |
| 'consumer_secret' => '', | |
| 'user_token' => '', //access token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * | |
| * Copyright (c) David Bushell | @dbushell | http://dbushell.com/ | |
| * | |
| */ | |
| var fs = require("fs"), | |
| path = require("path"); | |
| module.exports = function(grunt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Ajax File upload with jQuery and XHR2 | |
| // Sean Clark http://square-bracket.com | |
| // xhr2 file upload | |
| $.fn.upload = function(remote, data, successFn, progressFn) { | |
| // if we dont have post data, move it along | |
| if (typeof data != "object") { | |
| progressFn = successFn; | |
| successFn = data; | |
| } |