Skip to content

Instantly share code, notes, and snippets.

View phrawzty's full-sized avatar
🕺
probably karaoke

Daniel Maher phrawzty

🕺
probably karaoke
View GitHub Profile
@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

@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
anonymous
anonymous / x.py
Created May 3, 2014 20:17
extract channel info from http://sky.fm and make a json blob
#!/usr/bin/env python
import json
from pprint import pprint
import urllib
serviceurl = 'http://www.sky.fm'
data = urllib.urlopen(serviceurl)
page = data.readlines()
@erikrose
erikrose / git-review
Created September 26, 2013 17:02
I made myself a "git review" subcommand which takes a user:branch pair pasted from a pull request page, like abbeyj:macro-use-extents, and does the fetch and checkout to get me ready to try it out. It's like 2 lines, but it's remarkable the mental weight it lifts. I no longer dread reviews. Just stick it in a file called "git-review" (no extensi…
#!/usr/bin/env python
from subprocess import check_output
from sys import argv
def main():
user, branch = argv[1].split(':')
check_output('hub fetch %s' % user, shell=True)
check_output('git checkout %s/%s' % (user, branch), shell=True)
print 'Now reviewing %s:%s.' % (user, branch)
@paulczar
paulczar / logstash-perf.md
Last active May 14, 2018 03:13
logstash performance deets

Logstash Performance Testing

Server Details

HP BL460

  • 48 Gb Memory
  • 2 x X5675 @ 3.07GHz
  • 2 x 10 gbps NIC
  • 2tb NetApp NFS volume for ES data
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@willkg
willkg / reverse_recruit_template.rst
Last active November 21, 2021 21:14
reverse recruit email template

Below find the "reverse recruit" template. I'm using it. So can you!

===

Hi!

I'm not currently looking for a job as I'm pretty happy at my current job.

However Mozilla is hiring into a variety of positions. Mozilla also has

@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶