Skip to content

Instantly share code, notes, and snippets.

View fuzzy's full-sized avatar

Mike 'Fuzzy' Partin fuzzy

View GitHub Profile
@fuzzy
fuzzy / index.html
Created February 10, 2014 10:42
yep
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<link rel="stylesheet" href="/bootstrap.css"/>
<link rel="stylesheet" href="/bootstrap-theme.css"/>
<link rel="stylesheet" href="/bootstrap-responsive.css"/>
<link rel="stylesheet" href="/theme.css"/>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<link rel="stylesheet" href="/bootstrap.css"/>
<link rel="stylesheet" href="/bootstrap-theme.css"/>
<link rel="stylesheet" href="/bootstrap-responsive.css"/>
<link rel="stylesheet" href="/theme.css"/>
@fuzzy
fuzzy / test.d
Created February 16, 2014 01:28
exiting programs after catching unix signals with D runtime shutdown
import std.stdio;
import core.sys.posix.signal;
import core.runtime : Runtime;
import core.stdc.stdlib : exit;
void main(){
Test object = new Test;
sigset(SIGINT, &mybye);
sigset(SIGTERM, &mybye);
while (true) writeln("H1!!");
#!/bin/bash
# this wrapper script will handle running a rake task or set of tasks from a
# custom directory.
# set some useful variables...or die trying
OPSTOOL_CONFIG_DIR=${OPSTOOL_CONFIG_DIR:-"/etc/liquidplanner/opstool"}
OPSTOOL_CONFIG_FILE=${OPSTOOL_CONFIG_DIR}/opstool.conf
# Grab our configs...or die trying
@fuzzy
fuzzy / gist:c2e34247ddd95d8e11ec
Last active August 29, 2015 14:05
sample rt usage
$ which luac
$ rt list
Available packages:
$ rt install dev-lang/lua
prepping dev-lang/lua from source: '/home/mike/.runtimes/tmp/sources/lua-5.2.3.tar.gz
compiling: dev-lang/lua
archiving: dev-lang/lua
installing: dev-lang/lua
cleaning: dev-lang/lua
$ rt list
Mon Sep 8 00:46:38 PDT 2014
ARCH=amd64 DESCRIPTION=Python is a programming language that lets you work\nmore quickly and integrate your systems more effectively.
LOGNAME=mike LANG=C BUILDER_DEBUG=0 MAKELEVEL=1 RULESFILE=/home/mike/.runtimes/pkgs.d/lang/python/Buildrules BUILDER_CALL_STACK=__main
__ BUILDER_ATFDIR=/home/mike/.runtimes/tmp/artifacts DESKTOP_SESSION=i3 T=/home/mike/.runtimes/tmp/lang/python/tmp XAUTHORITY=/var/run
/gdm/auth-for-mike-8P2nzQ/database GNOME_KEYRING_PID=2248 RELEASE=0 RPROMPT=$%{^[[31m%}[%{^[[37m%}%D{%Y-%m-%d %H:%M:%S}%{^[[31m%}]%{^[
[00m%} GNOME_KEYRING_CONTROL=/tmp/keyring-jDc9KF W=/home/mike/.runtimes/tmp/lang/python/work BUILDER_CFGDIR=/home/mike/.runtimes/.buil
der PATH=/home/mike/.runtimes/bin/scripts/libexec:/home/mike/.runtimes/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbi
n TOPDIR=/home/mike/.runtimes PKG_VERSION=2.7.8 SYSROOT=/home/mike/.runtimes/pkgs/amd64/FreeBSD/10.1-PRERELEASE/python-2.7.8 PKG_NAME=
lang/python LICENSE= MAKE_OPTS=-j5 SOURCE_URI=http:
@fuzzy
fuzzy / vtxenable.c
Created October 15, 2014 22:33
modification of code found at: http://www.linux-kvm.org/page/Enable_VT-X_on_Mac_Pro_%28Early_2008%29 to support FreeBSD
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/cpuctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
/* Returns 1 if processor found, 0 otherwise */
@fuzzy
fuzzy / oui.py
Created October 17, 2014 03:45
OUI lookup (requires inet access)
#!/usr/bin/env python
import re
import sys
import urllib2
import HTMLParser
uri = 'http://aruljohn.com/mac'
headers = {'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
ouiTag = None
--- weather.py 2014-11-18 13:29:26.346413808 -0800
+++ weathernew.py 2014-11-18 14:00:28.478386947 -0800
@@ -6,7 +6,7 @@
@hook.api_key('wunderground')
@hook.command(autohelp=False)
def weather(inp, chan='', nick='', reply=None, db=None, api_key=None):
- ".weather <location> [dontsave] | @<nick> -- gets weather data from Wunderground "\
+ ".weather <location> [dontsave] | @<nick> | [forget] -- gets weather data from Wunderground "\
"http://wunderground.com/weather/api"
@fuzzy
fuzzy / gehenbot.go
Created November 23, 2014 09:28
a basic irc bot, that is pretty crappy, but it's the first thing I've done in go, yay
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"strings"
"time"