Skip to content

Instantly share code, notes, and snippets.

View gtfierro's full-sized avatar

Gabe Fierro gtfierro

View GitHub Profile
@siliconcow
siliconcow / gist:8572979
Last active January 4, 2016 05:09
Go gitcoin
package main
import (
"github.com/jgrahamc/go-openssl/sha1"
//"crypto/sha1"
"fmt"
"io/ioutil"
"log"
"os"
"strconv"
@jordelver
jordelver / gist:3073101
Created July 8, 2012 22:06
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite