Skip to content

Instantly share code, notes, and snippets.

View paulsmith's full-sized avatar
😀
Hi, friends

Paul Smith paulsmith

😀
Hi, friends
View GitHub Profile
diff -u -r c_only/Makefile plugins_darwin/Makefile
--- c_only/Makefile 2012-08-19 22:53:58.000000000 -0400
+++ plugins_darwin/Makefile 2012-08-24 08:00:34.000000000 -0400
@@ -10,7 +10,7 @@
PLUGIN_DIR = plugins
-all: htmlize_main $(PLUGIN_DIR)/tt.so $(PLUGIN_DIR)/narcissist.so
+all: htmlize_main $(PLUGIN_DIR)/tt.dylib $(PLUGIN_DIR)/narcissist.dylib
@paulsmith
paulsmith / fox-and-friends-crxns.md
Created September 21, 2012 15:28
Fox and Friends corrections

Fox and Friends corrections

  • The Bible was not a movie first.
  • Stalactites is not a childhood disease.
  • Iowa City never elected Mayor McCheese.
  • Allegra is not a religion.
  • Jeremy Lin was traded, not deported.
  • The sun and the moon do not high-five as they pass each other.
  • Vaginas don't look like that.
  • A dead person's skill does not contain their memories.
@paulsmith
paulsmith / README.md
Created December 20, 2012 16:16
Pizza!

Pizza, with generative log spiral pepperoni layout! Made with D3.js.

@paulsmith
paulsmith / oscars-2013-raw.txt
Last active December 10, 2015 23:18
Parsing a list of 2013 Oscar nominees into CSV. (The raw text is formatted strangely w.r.t. case because it was copy-pasted from a PDF.)
BEST PICTURE
Amour
TBD, Producer
Argo
Grant Heslov, Ben Affleck and George Clooney, Producers
BeAsts of the southern Wild
Dan Janvey, Josh Penn and Michael Gottwald, Producers
djAngo unchAined
Stacey Sher, Reginald Hudlin and Pilar Savone, Producers
les misérABles
@paulsmith
paulsmith / henrietta-cocktail.md
Last active December 13, 2015 18:49
The Henrietta cocktail

The Henrietta

Ingredients

  • 1-½ oz. Bulleit bourbon
  • ½ oz. St. Germain elderflower liquer
  • ½ oz. lemon juice
  • ¼ oz. simple syrup
@paulsmith
paulsmith / brew-doctor.log
Created March 29, 2013 18:13
brew install tmux (fails for version 1.8 stable on Mac OS X 10.6.8)
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Mapnik.framework/Programs/mapnik-config
@paulsmith
paulsmith / shoddy-cocktail.md
Created March 31, 2013 20:56
The Shoddy cocktail

The Shoddy

Ingredients

  • 1-½ oz. Bulleit bourbon
  • ¼ oz. Bénédictine
  • ¼ oz. simple syrup
  • 2-3 dashes Peychaud’s bitters
@paulsmith
paulsmith / gifted-and-talented-cocktail.md
Created April 14, 2013 22:12
The Gifted & Talented cocktail

The Gifted & Talented

An improved gin and tonic.

Ingredients

  • Cucumber medallion, peeled, on the thick side
  • 3-4 drops Scrappy’s lime bitters
  • 3-4 drops Scrappy’s grapefruit bitters
  • 2 oz. Plymouth gin
@paulsmith
paulsmith / appendgopkg.vim
Created April 29, 2013 18:00
A simple Vim command to quickly append a package to the list of imports in a Go source code file.
" AppendGoPackage() prompts you for the name of a Go package, searches for
" the import statement at the top of the file, appends the package to the
" list of names, and restores the cursor's location.
function! AppendGoPackage()
call inputsave()
let s:pkg = input("Go package: ")
call inputrestore()
let s:cmd = "normal! ma?^import (\<CR>%O\t\"" . s:pkg . "\"\<ESC>`a"
execute s:cmd
endfunction
@paulsmith
paulsmith / logproxy.go
Created July 11, 2013 04:05
Logging TCP proxy, with SSL/TLS support
package main
import (
"crypto/tls"
"flag"
"fmt"
"io"
"log"
"net"
"os"