Skip to content

Instantly share code, notes, and snippets.


James Rivett-Carnac yarbelk

View GitHub Profile
yarbelk /
Last active Jun 17, 2017
Create, partiton and format EBS volume in a script for AWS EBS
resource "aws_launch_configuration" "test" {
name_prefix = "lc-test-"
image_id = "${data.aws_ami.ubuntu.image_id}"
instance_type = "t2.small"
security_groups = ["${}"]
associate_public_ip_address = false
key_name = "${var.bastion_keypair_name}" /* bastion == bounce host since there is no public ip */
user_data = "${data.template_file.user_data.rendered}"
iam_instance_profile = "${aws_iam_instance_profile.test.arn}"
yarbelk / create_services.powershell
Created Jun 14, 2017
Nomad Server on windows 2016
View create_services.powershell
Sc create "Consul" binPath="C:\consul\consul.exe -config-dir=C:\consul\etc\" DisplayName="Consul" start="auto"
Sc create "Nomad" binPath="C:\nomad\nomad.exe agent -config=C:\nomad\etc\" DisplayName="Nomad" start="auto" depend="Consul"
yarbelk / zfs_pools.rst
Created Jan 11, 2016
zsh hybrid pools
View zfs_pools.rst
yarbelk / mandy.rb
Last active Aug 29, 2015
Mandelbrot Set done with colors (and BEN!)
View mandy.rb
require 'complex'
XR = 0.01575 * 2
YR = 0.0125 * 2
ESCAPE_RADIUS = ARGV[0].to_f || 2.0
def mandelbrot(a)
x = a.real
y = a.imaginary
i = 0
View gist:b403f56a1fb8c661c12a
#taken from
#I keep struggling to find it, so made it a gist.
# install build tools
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
# install python 2.7 and change default python symlink
sudo yum install python27-devel -y
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
yarbelk /
Created Dec 28, 2012
a command line utility to export github issues. requires the `requests` library.
#!/usr/bin/env python
# export github issues to a csv file
import json
import requests
import csv
import getpass
from StringIO import StringIO
import argparse
import sys
yarbelk /
Created May 26, 2012
Example to illustrate a problem I'm having with multi-table inheritance for user profiles in django and Userena
# This is the form to sign up a Spam Type Person
from django import forms
from userena.forms import SignupFormTos
from . models import CommonProfile, SpamProfile
class SpamSignupForm(SignupFormTos):
"""signup a Spam Person"""
common_field = forms.CharField(label='what is your quest')
spam_field = forms.CharField(label='what kind of spam are you')
You can’t perform that action at this time.