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 ruby | |
# | |
# git-branch-delete | |
# | |
# Deletes a branch both locally and remotely in the origin. | |
# | |
############################################################################### | |
# Usage | |
############################################################################### |
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
/* File: check64bit.c | |
* Description: Check if the running version of Mac OS X is 64-bit | |
* To Compile: gcc -Wall -o check64bit check64bit.c | |
* To run: ./check64bit | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/utsname.h> |
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
ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2' | /bin/sh |
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
git branch | grep "some_string_or_pattern" | xargs -n 1 git branch-delete |
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
/* | |
* File: sorting.m | |
* Author: Chad Armstrong | |
* Date: 22 September 2014 | |
* To compile: gcc -g -Wall -framework Foundation -o sorting sorting.m | |
*/ | |
#import <Foundation/Foundation.h> | |
void printByAge(NSArray *people); |
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/python | |
import fileinput | |
import json | |
if __name__ == "__main__": | |
text = '' | |
for line in fileinput.input(): | |
text = text + ' ' + line.strip() | |
jsonObj = json.loads(text) | |
print json.dumps(jsonObj, sort_keys=False, indent=2) |
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/python | |
import fileinput | |
import json | |
if __name__ == "__main__": | |
text = '' | |
for line in fileinput.input(): | |
text = text + ' ' + line.strip() | |
jsonObj = json.loads(text) | |
print json.dumps(jsonObj, sort_keys=False, separators=(',',':')) |
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
find . -name '.svn' | xargs git rm -rf --ignore-unmatch |
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
git branch | grep defects | awk '{original=$1; sub("defects","old-defects"); print original, $1}' | xargs -n 2 git branch -m |
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
find . -name *3x.png | xargs sips -Z 168 |
OlderNewer