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
// Wrap returns a new function which executes HandlerFunc before panicking. | |
func Wrap(fn func()) func() { | |
return func() { | |
// handle panics | |
defer func() { | |
if err := recover(); err != nil { | |
HandlerFunc(err) | |
pnic(err) | |
} | |
}() |
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
package filename | |
import ( | |
"fmt" | |
"runtime" | |
"strings" | |
"github.com/sirupsen/logrus" | |
) |
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
// Utility functions used to search up through directories for | |
// specific files. | |
package traverse | |
import ( | |
"fmt" | |
"io/ioutil" | |
"path/filepath" | |
) |
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
mkdir MyIcon.iconset | |
sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png | |
sips -z 32 32 Icon1024.png --out MyIcon.iconset/[email protected] | |
sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png | |
sips -z 64 64 Icon1024.png --out MyIcon.iconset/[email protected] | |
sips -z 128 128 Icon1024.png --out MyIcon.iconset/icon_128x128.png | |
sips -z 256 256 Icon1024.png --out MyIcon.iconset/[email protected] | |
sips -z 256 256 Icon1024.png --out MyIcon.iconset/icon_256x256.png | |
sips -z 512 512 Icon1024.png --out MyIcon.iconset/[email protected] | |
sips -z 512 512 Icon1024.png --out MyIcon.iconset/icon_512x512.png |
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
package main | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Cocoa | |
#import <Cocoa/Cocoa.h> | |
int | |
StartApp(void) { | |
[NSAutoreleasePool new]; |
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
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt -O /usr/local/bin/add-apt-repository && sudo chmod +x /usr/local/bin/add-apt-repository | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer |
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
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" | |
php composer.phar global require 'phpunit/phpunit=3.7.*' | |
sudo pear channel-discover pear.survivethedeepend.com | |
sudo pear channel-discover hamcrest.googlecode.com/svn/pear | |
sudo pear install --alldeps deepend/Mockery |
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
$defaultTime = date_default_timezone_get(); | |
date_default_timezone_set('America/Los_Angeles'); | |
$now = date("Y-m-d H:i:s"); | |
date_default_timezone_set($defaultTime); |
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
SELECT table_name AS "Table", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "test" AND table_name like "%" | |
ORDER BY 2 DESC; |
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
diff -Naur standard.xml mynewchange.xml > myfile.patch |
NewerOlder