Skip to content

Instantly share code, notes, and snippets.

View mynameisrufus's full-sized avatar

Rufus Post mynameisrufus

View GitHub Profile
@lukebyrne
lukebyrne / gist:8794e13c8a60467fd3bcab7f77748d9f
Last active March 12, 2020 02:49
Australian State Boundaries for Postgis geometry(MultiPolygon,4326 )
===============
South Australia
===============
0106000020E6100000020000000103000000010000001D000000CE0702B31633614083BD132C8ADE41C07E88A0CCBF3A61400B75E2F888E141C0305BF404B93D61407E8CB69CEDDC41C082A571197D416140FA76A4EEABE041C0AC2E9C75F343614006825A361DED41C02056531421426140EB2B7DBB46F341C00EFA473D61406140D84D40B12BF441C09C71F204BC3A6140A814145512EF41C0884622B8783561404ECA202CEEF241C030B75EC2E83361401E73B3EE15F841C028240C0AE332614073212155760342C024C2F4DB592E6140C45BDD73910942C0941F12E13B2C6140BAB6CE9CAF0242C054DDEF5BB42661406DB8272CC2FD41C0D2B87347BB24614007ABE44AFD0442C074397147D420614034505E5F0F0342C02A6D5A19351D6140587441DAF70542C09EC1190F291861402C8C730D3D0442C0DECC5399DA126140B0D9232CB6F741C07A0B5D704C116140FC00C49CF3F141C01050729E8712614064AC4C5F7FE741C00C41922370146140A2B09917D6DF41C00E937247F0226140CA8A5FE4FAD441C01875C97FB12A61401461A1C5D9CB41C03C651FB8F83061401A92FE5476CD41C052C12A8FB8326140ECEC844064CF41C04AE8B07A553461403DF9358807D441C07424B07A23336140DB27085570DC41C0CE0702B31633614083BD132C8ADE
@dlin-me
dlin-me / AuSimple.kml
Last active February 22, 2017 03:36
Australian State Boundaries Polygon ( Simplified version with overlap border )
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Australia State Polygon (Simplified with Overlaps)</name>
<description>Australia State Boundaries</description>
<Style id="polyStyID_0">
<LineStyle>
<color>66000000</color>
<width>2</width>
</LineStyle>
def pmap(enum)
return to_enum(:pmap, enum) unless block_given?
enum.map { |e| Thread.new { yield e } }.map(&:value)
end
# Returns elements in order, as expected.
pmap(1..10) { |e| e } #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Returns elements in nondeterministic order on MRI >= 1.9.3.
# Works as expected on JRuby, Rubinius, and earlier versions of MRI.
@freshtonic
freshtonic / description.md
Last active December 17, 2015 10:39
The Rails Asset Pipeline & Angular JS partials.

My Angular.js partials live in public/partials.

In development mode I want them served from there, in production I want to have an Angular.js module called templates which simply popuates the template cache for me.

This isn't just about performance in production: it's making sure the partials are embedded in the assets which forces the partial's lifetime to be the same as the assets with no other caching worries when we redeploy the app.

export DISPLAY=:1
Xvfb :1 &
node_version=v0.8.14
install_name=node-$node_version-linux-x64
node_home=$PWD/$install_name
if [ ! -e $install_name.tar.gz ]
then
@lampeh
lampeh / perroquet-poc.rst
Created October 16, 2012 00:13
Le perroquet: push updated data directly into varnish
@fcurella
fcurella / psql.py
Created August 27, 2012 16:22
postgres PubSub vs Redis
#!/usr/bin/env python
import select
import time
import psycopg2
import psycopg2.extensions
import sys
def get_cursor():
conn = psycopg2.connect("dbname=pgpubsub")
@sdepold
sdepold / LICENSE.txt
Created August 15, 2012 05:50 — forked from 140bytes/LICENSE.txt
140byt.es -- addObserverMethods
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sascha Depold http://depold.com
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@aslakhellesoy
aslakhellesoy / gitbox.sh
Created June 1, 2012 10:14
Set up a git remote in your DropBox
#!/bin/bash
# Call this script from a local git repo to set up a dropbox remote you can push and pull to
# I keep this script under ~/Dropbox/git/gitbox.sh
# Inspired from http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively
PWD=`pwd`
PROJECT=`basename $PWD`
pushd $HOME/Dropbox/git
git init --bare $PROJECT.git
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.