This file contains 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
[ { created_at: 'Mon Feb 29 23:08:54 +0000 2016', | |
id: 704443254360580100, | |
id_str: '704443254360580096', | |
text: 'HOW TO POST UP AT DA CLUB @GwenStefani @VanityFair https://t.co/4lpcSrMjVZ', | |
truncated: false, | |
source: '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', | |
in_reply_to_status_id: null, | |
in_reply_to_status_id_str: null, | |
in_reply_to_user_id: null, | |
in_reply_to_user_id_str: null, |
This file contains 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
curl -k -L https://npmjs.org/install.sh | sh |
This file contains 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
///////////////////////////////////////////////////////////////////////////////////// | |
// TEST CODE FOR PAYLOAD DATA CREATION | |
///////////////////////////////////////////////////////////////////////////////////// | |
var fs = require('fs'); | |
var fileName = '/tmp/results.json'; | |
fs.writeFile( fileName, JSON.stringify(res.body, null, 4), function (error) { | |
if (error) { | |
console.log(error); | |
} else { | |
console.log('JSON saved to temp dir: ', fileName); |
This file contains 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
$ git reset --hard | |
$ git pull | |
#might be aske to merge and leave a comment.... this defualt in osx is vim so type" :wq" to write and then quit vim. | |
$ git push <-- if you had anything commited you wanted to push the the repo. |
This file contains 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
var memoize = { | |
keys:{}, | |
set: function(key, value) { // set a key, value pair, return value | |
this.keys[key] = value; | |
return value; | |
}, | |
clear: function( ) { | |
this.keys = {}; // set in memoize keys, and return result | |
return this.key; |
This file contains 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
Array.prototype.clone = function() { | |
return this.slice(0); | |
}; |
This file contains 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
// Constructor | |
function Foo(bar) { | |
// always initialize all instance properties | |
this.bar = bar; | |
this.baz = 'baz'; // default value | |
} | |
// class methods | |
Foo.prototype.fooBar = function() { | |
}; |
This file contains 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
String.prototype.repeat = function (count) { | |
var sDiff = "", sBase2 = count > 0 ? this.valueOf() : ""; | |
for (var nMask = count; nMask > 1; nMask >>= 1) { | |
if (nMask & 1) { sDiff += sBase2; } | |
sBase2 += sBase2; | |
} | |
return sBase2 + sDiff; | |
}; | |
This file contains 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
ControlMaster auto | |
ControlPath /tmp/%r@%h:%p | |
ControlPersist yes |
This file contains 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
#!/bin/bash | |
# ~/.osx — http://mths.be/osx | |
# Ask for the administrator password upfront | |
#sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
#while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |