Skip to content

Instantly share code, notes, and snippets.

@AnthonyDiGirolamo
AnthonyDiGirolamo / kanboard.user.js
Last active August 29, 2015 14:19
kanboard greasemonkey tweaks
// ==UserScript==
// @name kanboard
// @namespace https://kanboard.ccs.ornl.gov/
// @include https://kanboard.ccs.ornl.gov/*
// @version 1
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
@AnthonyDiGirolamo
AnthonyDiGirolamo / vimfx-hints.css
Created August 31, 2015 18:07
vimfx-hints.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(ftp://), url-prefix(file://) {
/* AGENT_SHEET */
.VimFxHintMarker { position: absolute !important; display: block !important; top: -1px; left: -1px; white-space: nowrap !important; overflow: hidden !important; font-size: 11px !important; padding: 2px 3px !important; background-color: #feda31 !important; border: 0 !important; border-radius: 2px !important; box-shadow: inset 0 -2px 0 #b39922 !important;
}
.VimFxHintMarker span { color: #4a400e !important; font-family: Helvetica, Arial, sans-serif !important; font-weight: bold !important; font-size: 16px !important;
}
.VimFxHintMarker > .VimFxCharMatch { color: #dcbc2a !important; }
@AnthonyDiGirolamo
AnthonyDiGirolamo / python_interactive_breakpoint
Created December 11, 2009 17:00
python interactive session
#!/usr/bin/python
# Python Interactive Breakpoint
import traceback, code
try:
raise None
except:
frame = sys.exc_info()[2].tb_frame
namespace = dict(frame.f_globals)
namespace.update(frame.f_locals)
code.interact(banner="Entering Interactive Session", local=namespace)
@AnthonyDiGirolamo
AnthonyDiGirolamo / strftime%252520C
Created January 28, 2010 21:58
strftime legend
strftime Formatting Atoms
%a Abbreviated weekday name * Thu
%A Full weekday name * Thursday
%b Abbreviated month name * Aug
%B Full month name * August
%c Date and time representation * Thu Aug 23 14:55:02 2001
%d Day of the month (01-31) 23
%H Hour in 24h format (00-23) 14
%I Hour in 12h format (01-12) 02
@AnthonyDiGirolamo
AnthonyDiGirolamo / xinitrc
Created August 1, 2011 18:14
MacOSX X11 xinitrc
export PATH=/opt/local/bin:$PATH
xset b off
xmodmap -e "keycode 119 = Insert"
dwmstatus &
dwm
@AnthonyDiGirolamo
AnthonyDiGirolamo / spi_max6954_test.pde
Created August 28, 2011 01:40
Communicating with the MAX 6954 over an SPI bus using an ATMEGA328P.
#include <string.h>
#include <SPI.h>
#include <PS2Keyboard.h>
#include <avr/sleep.h>
#define PS2DATA 2
#define PS2IRQ 3
PS2Keyboard keyboard;
@AnthonyDiGirolamo
AnthonyDiGirolamo / fix_ftt.cpp
Created November 5, 2011 03:17
Arduino LCD VU Meter
#include <avr/pgmspace.h>
#include "fix_fft.h"
#include <WProgram.h>
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */
/*
All data are fixed-point short integers, in which -32768
to +32768 represent -1.0 to +1.0 respectively. Integer
arithmetic is used for speed, instead of the more natural
floating-point.
@AnthonyDiGirolamo
AnthonyDiGirolamo / big_character.pde
Created November 8, 2011 05:00
controlling a large 16 segment display and a rotary encoder using only an atmel328p
#include <avr/pgmspace.h>
#define ENC_A 14
#define ENC_B 15
#define ENC_PORT PINC
const prog_uint8_t character_map[][2] = {
{ B00000000, B00000000 }, // space
{ B00000010, B00000100 }, // ! 32
{ B00101000, B00000000 }, // "
@AnthonyDiGirolamo
AnthonyDiGirolamo / buzzer.pde
Created November 29, 2011 15:30
Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950).
// Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950).
// by Rob Faludi
// http://www.faludi.com
// Additions by Christopher Stevens
// http://www.christopherstevens.cc
//referenced from http://www.phy.mtu.edu/~suits/notefreqs.html
//starting with F noteFreqArr[1]
int noteFreqArr[] = {
@AnthonyDiGirolamo
AnthonyDiGirolamo / arduino_calc.pde
Created November 29, 2011 15:38
Arduino Algebraic Calculator using a PS2Keyboard and LiquidCrystal Libraries
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <PS2Keyboard.h>
#include <LiquidCrystal.h>
#define PS2DATA 2
#define PS2IRQ 3