Below is a quick start guide to developing node.js on OSX. These tools and settings will give you just about everything you would need on a clean install of OSX 10.10.X to get setup and coding.
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
function base64url(source) { | |
// Encode in classical base64 | |
encodedSource = CryptoJS.enc.Base64.stringify(source); | |
// Remove padding equal characters | |
encodedSource = encodedSource.replace(/=+$/, ''); | |
// Replace characters according to base64url specifications | |
encodedSource = encodedSource.replace(/\+/g, '-'); | |
encodedSource = encodedSource.replace(/\//g, '_'); |
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
Show hidden characters
// Sublime Text - Build System for Javascript | |
{ | |
"cmd": ["node", "$file"], | |
"selector": "source.js" | |
} |
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
<?php | |
/** | |
* API Request Caching | |
* | |
* Use server-side caching to store API request's as JSON at a set | |
* interval, rather than each pageload. | |
* | |
* @arg Argument description and usage info | |
*/ |
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
server { | |
## Your website name goes here. | |
server_name domainname.com www.domainname.com _; | |
## Your only path reference. | |
root /var/www/; | |
listen 8080; | |
## This should be in your http block and if it is, it's not needed here. | |
index index.html index.htm index.php; | |
include conf.d/drop; |
https://gist.github.com/juniorz/1081907
I borrowed heavily from http://blog.shupp.org/2012/08/12/local-timezone-lookups-by-coordinates-with-postgis/ to make # this gist which is geared towards mac users like myself.
$ brew update
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 | |
if [ "$GIT_SSH_KEY" != "" ]; then | |
echo "Cleaning up SSH config" >&1 | |
echo "" >&1 | |
# Now that npm has finished running, | |
# we shouldn't need the ssh key/config anymore. | |
# Remove the files that we created. | |
rm -f ~/.ssh/config | |
rm -f ~/.ssh/deploy_key |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 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
amcik | |
arse | |
arsehole | |
arserape | |
arsewipe | |
ass | |
asses | |
asshole | |
assholes | |
assramer |
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
[ | |
{ | |
"city": "New York", | |
"growth_from_2000_to_2013": "4.8%", | |
"latitude": 40.7127837, | |
"longitude": -74.0059413, | |
"population": "8405837", | |
"rank": "1", | |
"state": "New York" | |
}, |
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
function create_branch_pr { | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
remote=$(git config remote.origin.url | cut -d. -f1-2) | |
echo "$remote/compare/develop...updates/$branch" | |
} | |
alias opr='open -a /Applications/Google\ Chrome.app $(create_branch_pr)' |
NewerOlder