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
#enables color in the terminal bash shell export | |
export CLICOLOR=1 | |
#sets up the color scheme for list export | |
export LSCOLORS=gxfxcxdxbxegedabagacad | |
#sets up the prompt color (currently a green similar to linux terminal) | |
MAGENTA="\033[1;36m" | |
PURPLE="\033[1;35m" | |
GREEN="\033[01;32m" | |
ORANGE="\033[01;31m" | |
WHITE="\033[01;37m" |
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
#!/bin/bash | |
cd ~/.ssh | |
echo "This is your key" | |
cat id_rsa.pub | |
pbcopy < id_rsa.pub |
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
function awscreds { | |
## switches between sets of AWS credentials. | |
## usage: awscreds <environment> | |
## e.g. awscreds tl | |
## It is advisable to customize the shell prompt to reflect current credentials. | |
if ! [[ -n $1 ]]; then | |
echo "Input is required" | |
else | |
case $1 in |
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
/* | |
Slightly strict regex check for validly formatted Canadian postal code | |
http://jsfiddle.net/7mBFf/ | |
*/ | |
var postal = new RegExp(/^\s*[a-ceghj-npr-tvxy]\d[a-ceghj-npr-tv-z](\s)?\d[a-ceghj-npr-tv-z]\d\s*$/i); | |
console.log(postal.test('m6k1s4')); // returns true | |
console.log(postal.test('M6K1S4')); // returns true | |
console.log(postal.test('90210')); // returns false |
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
var getLocation = function() { | |
if (navigator.geolocation) { | |
//get current position and pass the results to getPostalCode | |
return navigator.geolocation.getCurrentPosition(); | |
} else { | |
return false; | |
} | |
}; |