Skip to content

Instantly share code, notes, and snippets.

@mistydemeo
mistydemeo / ignore-thread-1.5.21.patch
Created May 6, 2013 00:40
mutt ignore thread patch for 1.5.21
diff -ru mutt-1.5.21.orig/OPS mutt-1.5.21/OPS
--- mutt-1.5.21.orig/OPS 2010-03-01 12:56:19.000000000 -0500
+++ mutt-1.5.21/OPS 2011-07-10 14:59:03.000000000 -0400
@@ -179,3 +179,4 @@
OP_MAIN_SHOW_LIMIT "show currently active limit pattern"
OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread"
OP_MAIN_COLLAPSE_ALL "collapse/uncollapse all threads"
+OP_MAIN_IGNORE_THREAD "toggle a message's 'ignore-thread' flag"
diff -ru mutt-1.5.21.orig/copy.c mutt-1.5.21/copy.c
--- mutt-1.5.21.orig/copy.c 2010-03-02 14:15:00.000000000 -0500
@mistydemeo
mistydemeo / GCC-10.7-v2.pkg.txt
Created May 29, 2013 04:19
pkgutil --payload-files ~/Desktop/GCC-10.7-v2.pkg
This file has been truncated, but you can view the full file.
.
./usr
./usr/bin
./usr/bin/c++-4.2
./usr/bin/cpp-4.2
./usr/bin/g++-4.2
./usr/bin/gcc-4.2
./usr/bin/gcov-4.2
./usr/bin/i686-apple-darwin11-cpp-4.2.1
./usr/bin/i686-apple-darwin11-g++-4.2.1
@mistydemeo
mistydemeo / DevSDK.txt
Created May 29, 2013 13:13
pkgutil --payload-files contents from the Apple Command Line Tools for Xcode
This file has been truncated, but you can view the full file.
.
./System
./System/Library
./usr
./usr/share
./usr/share/man
./System/Library/Frameworks
./System/Library/Frameworks/CoreServices.framework
./System/Library/Frameworks/CoreServices.framework/Versions
./System/Library/Frameworks/CoreServices.framework/Versions/A
require 'mustache'
require 'json'
template = "Why isn't {{Id}} showing up????"
json = <<-EOS
{
"Id": "ASDFKASDFJASDFKASDF"
}
EOS

The prompt I'm using is powerline. The python rewrite of powerline is in a stable beta right now, and works really nicely. It's designed to be usable as a prompt for various shells along with the traditional vim prompt.

To get decent performance as a zsh prompt, powerline is best used with the experimental python bindings for zsh. There's a pull request open right now to add optional zpython support. Because it removes the need for forking a new process every time the prompt is rendered, it dramatically speeds up performance.

The other two things I'm using right now are zsh-syntax-highlighting, which gives pretty fish-like syntax highlighting as you type commands on the commandline, and zsh-completions, a convenient set of prepackaged zsh completions.

I'm finding I'm happier setting my own aliases and making my own d

@mistydemeo
mistydemeo / gist:6118071
Last active December 20, 2015 10:49
Keyword arguments in Ruby
# 1.9.x and earlier don't support keyword arguments, but you can pass hashes as arguments
def function(hsh)
return hsh[:a] == hsh[:b]
end
function :a => :foo, :b => :bar #=> false
# The syntax is actually just a bit of syntactic sugar for passing a hash without enclosing braces.
# All of these are the same thing:
function :a => :foo, :b => :bar
@mistydemeo
mistydemeo / 01.configure
Created August 15, 2013 17:15
libffi build failure under superenv on Mac OS X 10.5.8, Xcode 3.1.4
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
continue configure in default builddir "./powerpc-apple-darwin9.8.0"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=powerpc-apple-darwin9.8.0" "darwin9.8.0"
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
@mistydemeo
mistydemeo / 01.configure
Created August 15, 2013 17:16
libffi build success under stdenv
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
continue configure in default builddir "./powerpc-apple-darwin9.8.0"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=powerpc-apple-darwin9.8.0" "darwin9.8.0"
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
ptr = FFI::MemoryPointer.new(:pointer)
gme_open_file(file, ptr, freq)
player = ptr.read_pointer
gme_start_track(player, 0)
@mistydemeo
mistydemeo / 01.configure
Created November 1, 2013 20:40
libtorrent failure under libc++
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking how to print strings... printf
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes