Skip to content

Instantly share code, notes, and snippets.

Avatar

David Wittman DavidWittman

View GitHub Profile
@DavidWittman
DavidWittman / cgminer-antminer-u1-usb.md
Created Mar 14, 2014
Mining Dogecoin/Litecoin with cgminer and the Antminer U1 USB.
View cgminer-antminer-u1-usb.md

Using cgminer with the Bitmain Antminer U1 USB

Download

Download the latest version of cgminer. At the time of writing, this is version 4.1.0.

$ wget http://ck.kolivas.org/apps/cgminer/cgminer-4.1.0.tar.bz2
$ tar xf cgminer-4.1.0.tar.bz2
$ cd cgminer-4.1.0
View coreos.ipxe
#!ipxe
set base-url http://beta.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAYQC2PxAKTLdczK9+RNsGGPsz0eC2pBlydBEcrbI7LSfiN7Bo5hQQVjki+Xpnp8EEYKpzu6eakL8MJj3E28wT/vNklT1KyMZrXnVhtsmOtBKKG/++odpaavdW2/AU0l7RZiE= coreos pxe demo"
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
View ansible-lxc.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Kevin Carter <kevin.carter@rackspace.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@DavidWittman
DavidWittman / naglite.go
Last active Aug 29, 2015
Status.dat parser for Icinga in Go. I'm sorry.
View naglite.go
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
@DavidWittman
DavidWittman / hipchat-to-slack.go
Created Jul 9, 2015
Relay for posting messages from a HipChat room into a Slack room
View hipchat-to-slack.go
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
View gist:1390013
function mixInto(object, mixIn) {
forEachIn(mixIn, function(name, value) {
object[name] = value;
});
};
@DavidWittman
DavidWittman / youtube_couch_mode.user.js
Created Jan 9, 2012
Greasemonkey Script to add "Couch Mode" to YouTube
View youtube_couch_mode.user.js
// ==UserScript==
// @name YouTube Couch Mode
// @author David Wittman <david@wittman.com>
// @namespace nowhere
// @description Adds a full-screen "Couch Mode" button to YouTube
// @include http://www.youtube.com/watch?*
// ==/UserScript==
// iframe detection
View .vimrc
set t_Co=256
colors molokai
syntax on
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set softtabstop=4
View gunicorn-upstart.conf.template
# %(mysite)s - run %(mysite)s instances (default is the prod instance)
#
# This runs gunicorn-django for %(mysite)s; to install:
# * sudo ln -s <this file> /etc/init/%(mysite)s
# * sudo initctl reload-configuration
#
# it expects the following directory layout:
#
# /home/%(mysite)s/public_html
# \-env -> virtualenv
@DavidWittman
DavidWittman / .bashrc
Created May 16, 2012
boot - openstack-compute/nova wrapper for building Cloud Servers
View .bashrc
# boot
# openstack-compute/nova wrapper for building Cloud Servers
# usage: boot <image> <flavor> <name>
function boot() {
# API Credentials
local USERNAME=${OPENSTACK_COMPUTE_USERNAME-"username"}
local APIKEY=${OPENSTACK_COMPUTE_APIKEY-"8b843e51cecdae209efd541b6dd52c04"}
# Boot specifics
local FLAVOR=3
You can’t perform that action at this time.