Skip to content

Instantly share code, notes, and snippets.

View selenamarie's full-sized avatar

Selena Deckelmann selenamarie

View GitHub Profile
@JerrySievert
JerrySievert / gist:5686043
Created May 31, 2013 16:08
geojson to esri json
work=# select geoJSONToEsri('{ "type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
]
}', '{ "wkid": 4326 }');
geojsontoesri
--------------------------------------------------------------------------------
--------
{"rings":[[[100,0],[101,0],[101,1],[100,1],[100,0]]],"spatialReference":{"wkid"
@kyledrake
kyledrake / gist:5915757
Last active December 19, 2015 06:59
Using Ruby to fuck up a file system
```ruby
require 'fileutils'
require 'securerandom'
2_000_000.times do |site|
site_name = SecureRandom.hex[0...20]
puts site_name
Dir.mkdir File.join('./', 'sites', site_name)
@emilyst
emilyst / gif.py
Last active December 29, 2015 14:19
#!/usr/local/bin/python3
# save to: ~/Library/Application\ Scripts/com.codeux.irc.textual/gif.py
# use as '/gif searchterm'
# prints a link to the first GIF to match the term to the current window
import sys
import random
search_term = sys.argv[2]
@twobraids
twobraids / gist:789e66fbe7590947b1dd
Created December 27, 2014 16:36
a limerick about reading code
I once saw some really opaque code;
while thinking this is just a big load;
ought to write it again;
to do less is a sin;
"choose writing over reading", I crowed
@rhelmer
rhelmer / gist:1475ac173362edefa469
Last active November 24, 2016 10:16
Socorro Lite

Socorro (Lite)

  1. Create a place to hold crashes
mkdir crashreports
cd crashreports
  1. Build stackwalker
@rhelmer
rhelmer / gist:b075f21f44f3e98579b1
Last active November 1, 2022 12:13
herokuish build+deploy using LXC

Introduction

Heroku differs from traditional build & deploy by having the concept of "buildpacks", which are a generic method to identify, compile and package builds. The traditional method here would be to have hardcoded build commands, in a Makefile for instance. Buildpacks generally make custom build+deploy steps uneccessary, although one can specify custom buildpacks if necessary.

When notifying Heroku that a deploy is needed (usually by a Github webook), Heroku will run through all supported buildpacks until one can identify your app, which is then compiled and packaged by the buildpack. The output of this process is referred to as a "slug", which contains your app and all dependencies. For instance, a Python app would have the virtualenv packaged inside it. Heroku automatically deploys slugs that are built successfully.

This document describes a way to use LXC and existing third-party tools to reproduce this setup.

You need to have a server running that accepts webhooks and can take act