Skip to content

Instantly share code, notes, and snippets.

View filipsalomonsson's full-sized avatar

Filip Salomonsson filipsalomonsson

View GitHub Profile

Simple file/stream encryption using OpenSSL

Create and store a 512-byte random encryption key named secret:

$ mkkey secret

Encrypt the contents of file with the secret key and write it to file.enc:

$ encrypt secret < file > file.enc
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@filipsalomonsson
filipsalomonsson / buildlibxml.diff
Created May 9, 2011 20:20 — forked from ento/buildlibxml.diff
Installing lxml on a Mac OS X 10.6 that has no PPC support (read: Xcode 4)
diff --git a/buildlibxml.py b/buildlibxml.py
index bfcf3e4..7bf36e5 100644
--- a/buildlibxml.py
+++ b/buildlibxml.py
@@ -284,8 +284,11 @@ def build_libxml2xslt(download_dir, build_dir,
})
else:
env.update({
- 'CFLAGS' : "-arch ppc -arch i386 -arch x86_64 -O2",
- 'LDFLAGS' : "-arch ppc -arch i386 -arch x86_64",