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
#!/usr/bin/env bash | |
(nohup /System/Library/Input\ Methods/KeyboardViewer.app/Contents/MacOS/KeyboardViewer &> /dev/null) & | |
sleep 3 | |
exit |
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 | |
# activate debugging | |
#set -x | |
# fail on any errors | |
set -e | |
INTERFACE=Wi-Fi | |
HOST=localhost |
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
#!/usr/bin/env bash | |
################################################################################## | |
## Change extension to .command to allow execution by double-clicking in Finder ## | |
################################################################################## | |
# activate debugging | |
#set -x | |
# fail on any errors |
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
#!/usr/bin/env bash | |
################################################################################## | |
## Change extension to .command to allow execution by double-clicking in Finder ## | |
################################################################################## | |
# activate debugging | |
#set -x | |
# fail on any errors |
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 | |
# activate debugging | |
#set -x | |
# fail on any errors | |
set -e | |
INTERFACE=Wi-Fi | |
HOST=127.0.0.1 |
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 | |
FORMULAS=(`brew list`); | |
for FORMULA in "${FORMULAS[@]}" | |
do | |
echo "brew unlink $FORMULA" && echo "brew link $FORMULA"; | |
OUTPUT=`brew unlink $FORMULA`; | |
echo $OUTPUT; | |
OUTPUT=`brew link $FORMULA`; | |
echo $OUTPUT; | |
done |
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
// Fetch photo URLs | |
urlEls = jQuery('.fbPhotoStarGridElement') | |
urls = [] | |
urlEls.each(function(i, el) { | |
url = $(el).attr('data-starred-src') | |
urls.push(url); | |
}) | |
// Helper for downloading files with a specified 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
/usr/libexec/PlistBuddy -x -c 'Print "Window Settings":"hullabaloo"' ~/Library/Preferences/com.apple.Terminal.plist\ | |
|tr -d '\n\t'|grep -o '[^>]*</key><data>[^<]*'\ | |
|while read l;do \ | |
echo ${l%%<*} $(base64 -d<<<${l##*>}|plutil -convert xml1 - -o -\ | |
|awk '/<data>/{getline;print}'|tr -d '\t'|base64 -d\ | |
|xargs -d ' ' -n 1 echo | xargs -I VAL echo "obase=16; (255*VAL)/1" | bc)\ | |
; done |
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
# Google Pagespeed | |
# https://developers.google.com/speed/pagespeed/module/configuration | |
pagespeed on; | |
pagespeed FileCachePath /var/cache/ngx_pagespeed/; | |
# let's speed up PageSpeed by storing it in the super duper fast memcached | |
pagespeed MemcachedThreads 1; | |
pagespeed MemcachedServers "127.0.0.1:11211"; | |
# show half the users an optimized site, half the regular site |
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 | |
# From: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source | |
set -e | |
NPS_VERSION=1.10.33.5 | |
# check http://nginx.org/en/download.html for the latest version | |
NGINX_VERSION=1.8.1 |