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
/etc/fstab | |
# Force raspberry pi to use tmpfs for these mounts | |
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0 | |
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0 | |
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0 | |
/boot/config.txt |
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
// Adam Petrone | |
// Creation date: ~2011? | |
// Select a text layer in Photoshop/Illustrator and it will distribute | |
// each letter to its own layer. | |
try | |
{ | |
// get the active document | |
var doc = app.activeDocument; | |
} | |
catch( e ) |
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
// Adam Petrone | |
// October 2014 | |
// Code to control my custom pan/tilt mechanism. | |
// Target Hardware: Arduino Pro Mini 8 or 16MHz should do. | |
#include <Servo.h> | |
#include <SoftwareSerial.h> | |
// DOUT, DIN on the XBee to pins 6 and 7 respectively on the Pro Mini. | |
SoftwareSerial ss = SoftwareSerial(6, 7); |
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
http://stackoverflow.com/questions/25770198/archive-in-xcode-6-is-producing-a-pkg-not-ipa | |
Add LSRequiresIPhoneOS YES to your plist. |
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
// Adam Petrone, September 2014 | |
// Robot based on original iRobot Roomba | |
#include <Wire.h> | |
#include <SoftwareSerial.h> | |
#include <Adafruit_NeoPixel.h> | |
// wired up to pins 12, and 13 of Arduino Pro Mini | |
SoftwareSerial ss = SoftwareSerial(13, 12); | |
// motor output pins |
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
# We don't need dos2unix: | |
cat foo | col -b > foo2 | |
# force process to background without killing it in a terminal. | |
$ sleep 1000 | |
^Z | |
[1]+ Stopped sleep 1000 | |
$ bg | |
$ disown | |
$ exit |
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
# August 2014 | |
# Adam Petrone | |
# This is a Sublime Text 2 plugin and was designed | |
# to allow live-editing of variables in my codebase | |
# for quicker iteration times. | |
# It communicates with CivetServer on the native C++ side | |
# and parses the incoming JSON. |
NewerOlder