Skip to content

Instantly share code, notes, and snippets.

View saranrapjs's full-sized avatar

Jeff Sisson saranrapjs

View GitHub Profile
@waldoj
waldoj / virginia-tmsm.csv
Created October 24, 2014 15:04
Every trademark and service mark registered with the Virginia State Corporation Commission, as of October 23, 2014.
type file_number term
SM 6185 "Joe D. Roofer" (& design)
SM 8482 "The Original Home of Brunswick Stew"
SM 5322 "Warren-ty" Services
SM 8935 $3.00 Car Wash Free Vacuums TLC (& design)
SM 10584 & Live It Now (& design in color)
SM 7482 1-800-STARNES
SM 11064 1-888-LOCK-U-UP
SM 7888 1st Choice women's health center (& design)
SM 3070 1st Step Financial
set theProcessName to "iOS Simulator"
set theWindowNumber to 1
tell application "System Events"
tell process theProcessName
activate
tell window theWindowNumber
set thePosition to position
set theSize to size
end tell
@dacort
dacort / cookiemonster.go
Created September 23, 2014 06:51
Simple script to extract (encrypted) cookies out of Chrome OS X cookie store. Usage: ./cookiemonster domain.com
package main
import (
"code.google.com/p/go.crypto/pbkdf2"
"crypto/aes"
"crypto/cipher"
"crypto/sha1"
"database/sql"
"fmt"
"log"
@jgadelange
jgadelange / gist:808ebcb95cdfc469e7fb
Created September 20, 2014 14:02
Django/Stripe: parse timestamp and estimate prorate
from django.utils import timezone
def parse_timestamp(ts):
if ts is not None:
dt = datetime.datetime.fromtimestamp(ts)
dt = dt.replace(tzinfo=timezone.utc)
return dt
@carlossless
carlossless / jenkins-port-forwarding.md
Last active December 14, 2023 15:49
Port Forwarding (8080 -> 80) with `pf` on Mavericks/Yosemite

Jenkins Port Forwarding (8080 -> 80) with pf on Mavericks/Yosemite

This guide is a fork from this gist. I've added minor adjustments to customise these rules to forward connections from an outsite interface like en0.

Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

1. Create the anchor file

Create an anchor file under /etc/pf.anchors/com.jenkins with your redirection rule like:

@djinn
djinn / syllable.go
Created May 29, 2014 10:00
Syllable calculation done in golang
package main
import (
"log"
"strings"
)
func isVowel(chr_ rune) bool {
chr := string(chr_)
if (strings.EqualFold(chr, "a") || strings.EqualFold(chr, "e") ||
@kujohn
kujohn / portforwarding.md
Last active April 27, 2024 20:16
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@tylerhowarth
tylerhowarth / cloud.typography-aws-s3.md
Last active June 11, 2021 08:13
Cloud.typography fonts on Amazon S3. Using Hoefler + Frere-Jones Fonts in Production Mode on AWS

Fix Cloud.Typography Fonts in Production mode on Amazon S3

I recently switched a project from Development to Production Mode on cloud.typography, uploaded the files to S3, and none of the fonts were rendering completely.

It seems that Amazon's web uploader doesn't assign the correct MIME types for .eot files.

Make sure that the Content-Type for your .eot files is 'application/vnd.ms-fontobject'

Your .css files should have a Content-Type of 'text/css'

@ptrv
ptrv / spatialite_example.go
Last active September 8, 2022 02:48
SpatiaLite example in Go
package main
import (
"database/sql"
"github.com/mattn/go-sqlite3"
"log"
"os"
)
func runQuery(db *sql.DB, query string) {
@kristopherjohnson
kristopherjohnson / TimestampUtils.java
Created July 31, 2013 18:20
Methods for generating ISO 8601 timestamps in Java/Android
package net.kristopherjohnson.util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
/**
* Methods for dealing with timestamps