Shawn Moore (@sartak) blog has videos, PDFs, etc. of his "git flux" talk he's presented a few times.
- Http://www.linkedin.com/in/ptdecker
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 | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
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
/* | |
* @name arrayEqual | |
* @description check if two arrays are equal | |
* @param {arr} Array to check | |
* @param {arr} Array to check | |
* @return {Boolean} Boolean, returns true if arrays are the same | |
*/ | |
function arrayEqual(a, b) { |
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 | |
UP=$(pgrep mysql | wc -l); | |
if [ "$UP" -ne 1 ]; | |
then | |
echo "MySQL is down."; | |
sudo service mysql start | |
else | |
echo "All is well."; | |
fi |
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
# Full chromatic scale with frequencies | |
chromatic_scale = | |
"C0" : 16.35 | |
"C#0": 17.32 | |
"Db0": 17.32 | |
"D0" : 18.35 | |
"D#0": 19.45 | |
"Eb0": 19.45 | |
"E0" : 20.60 |
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 situation = 'pigs'; | |
var conditionEnd = ' like it\'s hot.'; | |
switch (situation) { | |
case 'pigs': | |
alert('Park it' + conditionEnd); | |
break; | |
case 'pimps': | |
alert('Drop it' + conditionEnd); | |
break; |
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
module WhenToDropIt | |
( Sitch (..) | |
, whatDoIDo | |
) where | |
data Sitch = Pigs | Pimps | NgAttitude | |
suffix :: String | |
suffix = " like it's hot." ++ | |
"\nI got the rolly on my arm and I'm puring Chandon." |
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 vol(){ audiovol 'output' $1; } | |
function mic(){ audiovol 'input' $1; } | |
function audiovol(){ | |
AUDIO_IO=$1 | |
NEW_VOLUME=$2 | |
[[ "$AUDIO_IO" == "" ]] && AUDIO_IO='input' | |
[[ "$AUDIO_IO" == "input" ]] && DEVICE_TEXT='Microphone' || DEVICE_TEXT='Speakers' | |
if [[ "$NEW_VOLUME" == "" ]]; then [ "$(osascript -e "$AUDIO_IO volume of (get volume settings)")" -gt 0 ] && NEW_VOLUME=0 || NEW_VOLUME=100; fi | |
[ $NEW_VOLUME -gt 0 ] && MUTE_TEXT='Unmuted' || MUTE_TEXT='Muted' |
This is a (at present, Mac-exclusive) command-line utility that will automatically perform all relevant steps required to get SSH up and running on your Mac with GitHub. It is a genuine, well-designed, superfine, one-time, one-line, benign, online, commandline goldmine to streamline your storyline and leave you on cloud-nine!
Oh, and it performs the following activities:
- Create an SSH key on your local machine
- Activate the SSH Agent
- Create/amend your SSH config file to contain the newly-created key
OlderNewer