Skip to content

Instantly share code, notes, and snippets.

View fuzzy's full-sized avatar

Mike 'Fuzzy' Partin fuzzy

View GitHub Profile
@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 */
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 / 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
#!/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 / 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!!");
<!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 / 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"/>
@fuzzy
fuzzy / models.py
Created January 21, 2014 06:38
models
from cryptolizzard.db.peewee import *
db = MySQLDatabase('cryptolizzard', user='clizzard', passwd='<pass>', host='192.168.0.2')
db.connect()
class BaseModel(Model):
class Meta:
database = db
# Operational models
@fuzzy
fuzzy / apt-tool.rb
Created October 11, 2013 00:00
apt automation tool for use in puppet
#!/usr/bin/env ruby
require 'open3'
require 'open-uri'
require 'getoptlong'
require 'digest/md5'
class Apt
def initialize
mike@jubei:~$ git clone git://git.silverirc.com/screenfetch.git
Cloning into 'screenfetch'...
remote: Counting objects: 1595, done.
remote: Compressing objects: 100% (1048/1048), done.
remote: Total 1595 (delta 928), reused 948 (delta 533)
Receiving objects: 100% (1595/1595), 1.90 MiB | 390 KiB/s, done.
Resolving deltas: 100% (928/928), done.
mike@jubei:~$ cd screenfetch/
mike@jubei:~/screenfetch$ ./screenfetch-dev
_,met$$$$$gg. mike@jubei