Skip to content

Instantly share code, notes, and snippets.

View zakgrant's full-sized avatar
🎯
Focusing

Zak Grant zakgrant

🎯
Focusing
View GitHub Profile
@zakgrant
zakgrant / non_sys_row_count.sql
Created November 28, 2012 09:47
Postgres non system table row count
SELECT relname, n_tup_ins - n_tup_del as rowcount
FROM pg_stat_all_tables
WHERE relname NOT LIKE 'pg_%'
AND relname NOT LIKE 'sql_%';
defaults write NSGlobalDomain NSUseLeopardWindowValues NO
defaults write com.apple.Safari NSUseLeopardWindowValues YES
@zakgrant
zakgrant / multi-type-schema.json
Created July 1, 2013 11:15
This is how to represent an object that can have multiple types within a JSON Schema
{
"$schema": "http://json-schema.org/draft-03/schema#",
"type": [
{
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
{
"type": "string",
@zakgrant
zakgrant / phrases
Last active December 20, 2015 04:59
You Cunt Quotes for the ucaas
Well aren't you being a cunt-a-saurus Rex today.
@zakgrant
zakgrant / index.html
Last active December 20, 2015 19:28
Bike route through the Kells hills via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
font-size:11px;
@zakgrant
zakgrant / map.geojson
Created August 17, 2013 16:05
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zakgrant
zakgrant / jenv.rb
Created August 20, 2013 08:04
Modified brew formula for jenv
require 'formula'
class Jenv < Formula
homepage 'https://github.com/gcuisinier/jenv'
url 'https://github.com/gcuisinier/jenv/archive/0.1.1.tar.gz'
sha1 '5885dd46658d92cf756160484f01936a1bdd77ce'
def install
libexec.install Dir['*']
bin.write_exec_script libexec/'bin/jenv'
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 1
max_peers = 100
# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 1
### Keybase proof
I hereby claim:
* I am zakgrant on github.
* I am zakgrant (https://keybase.io/zakgrant) on keybase.
* I have a public key whose fingerprint is 5C58 70F1 01D1 95B1 16A4 D207 2BA9 9949 DCC3 9573
To claim this, I am signing this object: