Skip to content

Instantly share code, notes, and snippets.

@andrewbunday
andrewbunday / .SciteUser.properties
Created June 28, 2011 11:51
My current scite properties. Seriously messed up and not for the faint of heart
line.margin.width=1+
line.margin.visible=1
view.python.whitespace=1
view.eol=0
# Indentation
tabsize=4
indent.size=4
use.tabs=0
indent.auto=1
@andrewbunday
andrewbunday / install_nvidia-current.py
Created July 6, 2011 10:41
Replacing Jockey-text with a few short lines of simplified python
#!/usr/bin/env python
import apt
import subprocess
#import fnctrl <-- filelock on modprobe blacklists...
#import XKit.xutils <-- xorg.conf file editing
driver = "nvidia-current"
xorg_conf_path = "/etc/X11/xorg.conf"
@andrewbunday
andrewbunday / run_stages.pp
Created July 7, 2011 16:33
Is there any way to specify the run stage for a puppet class I wish to include in several other classes?
Question:
Is there a way to make myclass run before my other
classes without defining explicit relationships?
==================================================
site.pp:
stage{ 'first': }
@andrewbunday
andrewbunday / test_json.py
Created October 11, 2011 14:29
I got annoyed the other day when I kept editing mission critical json based config files and had no way of knowing if the files were syntactically correct.
#!/usr/bin/env python
import json
import sys
checkedfiles={'good':[], 'bad':[]}
if len(sys.argv) > 1:
for arg in sys.argv[1:]:
try:
@andrewbunday
andrewbunday / userSetup.py
Created December 7, 2011 18:31
This kinda thing really gets on my wick. Sometimes a plugin comes along which doesn't source it's own shelves. When that happens you have to hunt around in the file system to load the shelf. So instead popping this file into the scripts directory of the p
import maya
def bbLoadShelf(name, filepath=""):
mainShelfLayout = maya.mel.eval('global string $gShelfTopLevel; string $tmp=$gShelfTopLevel;')
labels = maya.cmds.tabLayout(mainShelfLayout, query=True, tabLabel=True)
if not name in labels:
maya.mel.eval('addNewShelfTab "%s"' % name)
maya.utils.executeDeferred( bbLoadShelf('MyPlugin')
@andrewbunday
andrewbunday / versions.cfg
Created March 16, 2012 16:29
Development Version Names
Ambient
Bluegrass
Classical
Dubstep
Electro
Funk
Garage
HipHop
Indie
Jazz
@andrewbunday
andrewbunday / motd
Created November 13, 2012 09:48
hostname in motd
|^ | ~|~ ( |-| ]3 |_ /\ ( /<
___ ,---, ,--,
,-.----. ,--, ,--.'|_ ,--.' | ,---, ,--.'|
\ / \ ,--.'| | | :,' | | : ,---,.,---.'| | | :
| : || |, : : ' : : : : ,' .' || | : : : '
| | .\ :`--'_ .;__,' / ,---. : | |,--.,---.' ,: : : | ' |
. : |: |,' ,'| | | | / \ | : ' || | |: |,-.' | |
@andrewbunday
andrewbunday / gist:4650776
Last active December 11, 2015 19:48
GSettings Overrides For Desktop Nirvana.
#mouse focus milarky
[org.gnome.desktop.wm.preferences]
focus-mode='sloppy'
auto-raise=True
auto-raise-delay=500
@andrewbunday
andrewbunday / renderSubmitter.py
Last active December 12, 2015 12:18
Someone fucking hates me
pymel.formLayout(self.form, e=True,
attachForm=[
(self.location, "top", 0),
(self.location, "left", 0),
(self.location, "right", 0),
(self.jobNameText, "top", 25),
(self.jobNameText, "left", 5),
#include <FastLED.h>
#define NUM_LEDS 23
#define BRIGHTNESS_LEDS 84 // set within 0-100 for max brightnetss
//#define MAX_CYCLES 3
#define DATA_PIN 1 // pin the data line is connected to
// Define the array of leds
CRGB leds[NUM_LEDS];