curl -O -L http://www.ijg.org/files/jpegsrc.v9.tar.gz
tar -zxvf jpegsrc.v9.tar.gz
cd jpeg-9/
sudo CC="gcc -arch x86_64" ./configure -enable-shared -enable-static
sudo make
sudo make install
cd ..
| /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch" |
| wget \ | |
| --recursive \ | |
| --no-clobber \ | |
| --page-requisites \ | |
| --html-extension \ | |
| --convert-links \ | |
| --restrict-file-names=windows \ | |
| --domains site.com \ | |
| --no-parent \ | |
| site.com |
| { | |
| "cmd": ["casperjs", "--no-colors", "test", "$file"], | |
| "selector": "source.js" | |
| } |
| def var_dump(obj): | |
| '''return a printable representation of an object for debugging''' | |
| newobj=obj | |
| if '__dict__' in dir(obj): | |
| newobj=obj.__dict__ | |
| if ' object at ' in str(obj) and not newobj.has_key('__type__'): | |
| newobj['__type__']=str(obj) | |
| for attr in newobj: | |
| newobj[attr]=var_dump(newobj[attr]) | |
| return newobj |
To find the largest 10 files (linux/bash):
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
To find the largest 10 directories:
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
Only difference is -type {d:f}.
Source: http://superuser.com/questions/9847/linux-utility-for-finding-the-largest-files-directories
Generate JSON file and save to current directory:
plutil -convert json -r -o `sw_vers -productVersion`.json /System/Library/Input\ Methods/CharacterPalette.app/Contents/Resources/Category-Emoji.plist
Generate JSON file and copy to clipboard:
plutil -convert json -r -o - /System/Library/Input\ Methods/CharacterPalette.app/Contents/Resources/Category-Emoji.plist | pbcopy
From this brilliant blog post... https://josephscott.org/archives/2011/10/timing-details-with-curl/ found at http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
cURL supports formatted output for the details of the request (see the cURL manpage for details, under -w, –write-out ). For our purposes we’ll focus just on the timing details that are provided.
###Prepwork
Create .curl directory in your home folder:
| <?php | |
| // Authorized team tokens that you would need to get when creating a slash command. Same script can serve multiple teams, just keep adding tokens to the array below. | |
| $valid_tokens = array( | |
| "123asdzxcvasdfasdwasdfas", // key 1 | |
| "234xdfqadfsdfasdfasfasdf" // key 2 | |
| ); | |
| if (!in_array($_REQUEST['token'], $valid_tokens)) { | |
| bot_respond(":no_good: *Unauthorized token!* Feel free to grab a copy of this script and host it yourself."); |
| { | |
| "latitude": 37.752881, | |
| "longitude": -122.456429, | |
| "timezone": "America/Los_Angeles", | |
| "offset": -8, | |
| "currently": { | |
| "time": 1482272606, | |
| "summary": "Partly Cloudy", | |
| "icon": "partly-cloudy-day", | |
| "nearestStormDistance": 2, |