Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gunshor on github.
  • I am gunshor (https://keybase.io/gunshor) on keybase.
  • I have a public key whose fingerprint is C2C8 BCAB 9319 5BF0 A43F 56C8 BB6F 4845 B16A 6FCD

To claim this, I am signing this object:

@gunshor
gunshor / dumpjson.py
Created February 21, 2014 23:10 — forked from c2nes/dumpjson.py
#!/usr/bin/env python
import os
import sys
SOURCE_FILE = "/home/cmthunes/enwiki-20120211-pages-meta-current.xml"
OUTPUT_FILE = "/mnt/reports/cmthunes/enwiki-20120211.json"
def extract_with_delims(s, start_delim, end_delim):
start_index = s.find(start_delim)
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@gunshor
gunshor / Gemfile
Created February 7, 2013 20:50 — forked from soffes/Gemfile
source 'https://rubygems.org'
# The latest version of Ruby
ruby '2.0.0'
# The lastest version of Rails
gem 'rails', '3.2.11'
# Postgres
gem 'pg'
@gunshor
gunshor / gfm.rb
Created March 30, 2012 20:26 — forked from mojombo/gfm.rb
require 'digest/md5'
def gfm(text)
# Extract pre blocks
extractions = {}
text.gsub!(%r{<pre>.*?</pre>}m) do |match|
md5 = Digest::MD5.hexdigest(match)
extractions[md5] = match
"{gfm-extraction-#{md5}}"
end