This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This must be run with Administrator privileges in order to set environment variables | |
# http://code.activestate.com/recipes/55993/, Wolfgang Strobl | |
import _winreg | |
import sys | |
import traceback | |
import win32gui | |
import win32api | |
# this ensures that changes propagate immediately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KeySym sym = XKeycodeToKeysym(display, event.xkey.keycode, event.xkey.state & ShiftMask ? 1 : 0); | |
XGrabKey(dpy, XKeysymToKeycode(dpy, XK_F1), Mod1Mask, DefaultRootWindow(dpy), True, GrabModeAsync, GrabModeAsync); | |
XGrabKey(dpy, XKeysymToKeycode(dpy, XK_F2), Mod1Mask, DefaultRootWindow(dpy), True, GrabModeAsync, GrabModeAsync); | |
// XK_Tab | |
// XK_Escape | |
// move this window back to its original size at 0, 0. | |
if (ev.type == KeyPress && ev.xkey.keysym == XK_Tab) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Determine why Visual Studio is rebuilding a project: | |
-- add a block to enable debug view output (devenv.exe.config); check DebugView for the reason. | |
VS2010 | |
<system.diagnostics> | |
<switches> | |
<add name="CPS" value="4" /> | |
</switches> | |
</system.diagnostics> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adam Petrone | |
# May 2012 | |
# USAGE: ./gclean.sh source_repo target_repo source_repo_subfolder git_location | |
# root/ | |
local_repo=$1 | |
# cerberus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias g='git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Date: January 2014 | |
Author: Adam Petrone | |
Aquarium Thermostat | |
*/ | |
#include <Wire.h> | |
#include <LiquidCrystal.h> | |
#include <TinyDHT.h> | |
#include <OneWire.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Date: December 2013 | |
Author: Adam Petrone | |
New Year's Hat | |
*/ | |
#include <Adafruit_NeoPixel.h> | |
const uint8_t NUM_PIXELS = 16; | |
const uint8_t PIXEL_DATA_PIN = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* So I had 5 meters of LPD8806 lying around with no plans to ever use them. | |
They will be my holiday lights this year, driven by an Arduino Pro Mini 5v. | |
Date: December 2013 | |
Author: Adam Petrone | |
*/ | |
#include <SPI.h> | |
#include <LPD8806.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Arduino-based motor controller | |
// This was designed to work with a Spektrum AR6200 receiver, but any receiver should work | |
// with proper calibration and setup of available channels. | |
#include <Adafruit_NeoPixel.h> | |
const uint8_t DATA_PIN = 7; | |
const uint8_t N_PIXELS = 8; | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_PIXELS, DATA_PIN, NEO_GRB + NEO_KHZ800); | |
uint8_t cpix = 0; | |
int8_t dir = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Arduino-based motor controller | |
// This was designed to work with a Spektrum AR6200 receiver, but any receiver should work | |
// with proper calibration and setup of available channels. | |
uint8_t GEAR_INPUT = 5; | |
uint8_t FLAPS_INPUT = 6; | |
uint8_t GEAR_OUTPUT = 7; | |
uint8_t FLAPS_OUTPUT = 8; |
NewerOlder