Skip to content

Instantly share code, notes, and snippets.

View zcourts's full-sized avatar

Courtney Robinson zcourts

View GitHub Profile
@zcourts
zcourts / gh-importer.py
Last active August 10, 2022 19:31 — forked from dasevilla/github-issue-to-phab-task.py
Copy GitHub issues to Phabricator
import json
import os
import sys
import requests
import envoy
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')
@zcourts
zcourts / server.conf
Created October 1, 2016 23:50 — forked from laurenorsini/server.conf
OpenVPN configuration for /etc/openvpn/server.conf
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
@zcourts
zcourts / phabricator_readme.md
Created September 25, 2016 23:54
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

#define _GNU_SOURCE 1
#include <sched.h> // sched_setaffinity
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <assert.h>
#include <sys/time.h>
#define _GNU_SOURCE 1
#include <sched.h> // sched_setaffinity
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <assert.h>
#include <sys/time.h>
@zcourts
zcourts / new-openvpn-client.sh
Created July 7, 2016 10:02 — forked from hcooper/new-openvpn-client.sh
Script to automate creating new OpenVPN client certificates and make them easy to download
#! /bin/bash
# Script to automate creating new OpenVPN clients
# The client cert and key, along with the CA cert is
# zipped up and placed somewhere to download securely
#
# H Cooper - 05/02/11
#
# Usage: new-openvpn-client.sh <common-name>
# Set where we're working from
@zcourts
zcourts / streams-tutorial.md
Created March 6, 2016 19:13 — forked from djspiewak/streams-tutorial.md
Introduction to scalaz-stream

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca

@zcourts
zcourts / init.coffee
Created February 1, 2016 22:44
Load env variables from ZSH for Atom
fs = require('fs')
# Import ENV from zsh config.
fs.readFile process.env.HOME+"/.zshrc", "utf8", (err, zshFile) ->
envPaths = []
for l in zshFile.split('\n')
if l.substring(0,11) is 'export PATH'
e = l.split('=').splice(-1)[0]
e = e.replace(':$PATH','').replace(/"/g,'')
if ':' in e
@zcourts
zcourts / springer-free-maths-books.md
Created December 28, 2015 23:18 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@zcourts
zcourts / yamlson
Created November 19, 2015 09:21 — forked from mpitid/yamlson
#!/usr/bin/env python
import sys, json, yaml
def transform(filename=None):
stream = sys.stdin if filename is None else open(filename, 'rb')
return json.dumps(yaml.load(stream), separators=(',',':'))
if __name__ == '__main__':
sys.stdout.write(transform(*sys.argv[1:]))