Skip to content

Instantly share code, notes, and snippets.

View jordan-wright's full-sized avatar
🎣

Jordan Wright jordan-wright

🎣
View GitHub Profile
  1. CGI.pm is shit
  2. CGI is shit
  3. <"ARGV"> shouldn't work under use strict because thats a string dereferencing a symbolic ref.
  4. Hash Keys can't retain tainting and so can be used to propagate un-vetted data into safe spaces:
  my $hash = unsafe_thing_that_returns_a_hash();
  $dbh->query(join keys %{$hash}); # data will be untained regardless of what it is.
  1. CGI.pm should probably do something smarter than simply returning the first param when >1 params
@mauricerkelly
mauricerkelly / Rakefile task
Created October 21, 2012 16:49
publish_draft task for Octopress Rakefile
require "preamble"
desc "Publish draft"
task :publish_draft do
posts_path = "#{source_dir}/#{posts_dir}"
puts "Listing drafts in #{posts_path}..."
drafts = Array.new()
Dir.glob("#{posts_path}/*.*").each_with_index do |post, idx|
yaml = Preamble.load(post)
@border
border / Makefile
Created January 12, 2011 01:36
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go