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
lipo -info /usr/lib/libiodbc.a |
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
watch set expression (int *)0x12345678 (or w s e (int *)0x12345678) |
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
#include <iostream> | |
#include <cmath> | |
#include <iomanip> | |
#include <chrono> | |
int fun(const int a, const int b, const int c) { | |
return a * b * c; | |
} | |
int main(int argc, const char * argv[]) { |
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
expr (int) printf("%f %d %f %d", x, y, z, q) |
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
# Thanks to http://vivekjain10.blogspot.co.uk/2008/02/average-file-size-within-directory.html | |
find . -type f -name *.wav -print0 | xargs -0 ls -l | awk '{sum += $5; n++;} END {print sum/(n-1)/1024/1024;}' |
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
/usr/bin/chflags nohidden ~/Library |
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
the_path=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "../../some/relative/path") |
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
[NSURL fileURLWithPath:nsstringPath]; |
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
dmg_vol_name="name" | |
dmg_path="/path/to/final/dmg/$dmg_vol_name.dmg" # Final DMG that you will be shipping | |
dmg_build_path="/path/to/temp/dmg/$dmg_vol_name.dmg" # Temporary DMG that will be worked on and then deleted | |
dmg_volume="/Volumes/$dmg_vol_name" # Should match the mounted name of your DMG. Be sensible and make it the name ;-P | |
hdiutil attach -owners on "dmg_build_path" -shadow | |
bless "$dmg_volume/" --openfolder "$dmg_volume" # This actually makes the change to auto open the DMG in finder | |
hdiutil detach "$dmg_volume" | |
hdiutil convert -format UDZO -o "$dmg_path" "$dmg_build_path" -shadow |