Skip to content

Instantly share code, notes, and snippets.

View DavidWittman's full-sized avatar

David Wittman DavidWittman

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

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
#!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
#!/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 August 29, 2015 14:16
Status.dat parser for Icinga in Go. I'm sorry.
package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
@DavidWittman
DavidWittman / hipchat-to-slack.go
Created July 9, 2015 03:17
Relay for posting messages from a HipChat room into a Slack room
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
@DavidWittman
DavidWittman / gist:1390013
Created November 23, 2011 21:46
Javascript Mixin
function mixInto(object, mixIn) {
forEachIn(mixIn, function(name, value) {
object[name] = value;
});
};
@DavidWittman
DavidWittman / youtube_couch_mode.user.js
Created January 9, 2012 19:38
Greasemonkey Script to add "Couch Mode" to YouTube
// ==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
@DavidWittman
DavidWittman / .vimrc
Created March 14, 2012 17:38
My .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
# %(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 00:48
boot - openstack-compute/nova wrapper for building Cloud Servers
# 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