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
# Time something | |
def t; t = Time.now; r = yield; puts Time.now - t; r; end | |
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
require 'rake/clean' | |
require 'rake/testtask' | |
# Insert executable name here | |
TARGET = '' | |
CLEAN.include('**/*.6') | |
CLOBBER.include(TARGET) | |
def required_modules go_file |
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
# Convert ssh-rsa key to pem | |
ssh-keygen -f infile.pub -e -m PKCS8 > outfile.pem | |
# Encrypt a file using public key pem | |
openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl | |
# Decrypt using private key | |
openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"go/parser" | |
"go/token" | |
"go/ast" | |
"go/printer" |
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
@interface UIView (MPAdditions) | |
@end | |
@implementation UIView (MPAdditions) | |
- (id)debugQuickLookObject { | |
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) { | |
return nil; | |
} | |