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
// ==UserScript== | |
// @name Remove annoying Hangouts promot | |
// @include https://news.google.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js | |
// ==/UserScript== | |
//var divPromo = document.evaluate('//div[@class="hangouts-promo"]', document, null, typeXPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; |
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
class Config { | |
JSONObject json; | |
Config(String cfgFile) { | |
json = loadJSONObject(cfgFile); | |
} | |
String getValue(String k) { return json.getString(k); } | |
String getString(String k) { return json.getString(k); } |
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
import java.util.Map; | |
import java.util.Iterator; | |
class Configgy { | |
String[] configTextLines; | |
JSONObject json; | |
Configgy(String configFile) { | |
try { |
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
# Add this as a board item to the "boards.txt" file for arcore | |
flora.name=Adafruit Flora (arcore) | |
flora.upload.protocol=avr109 | |
flora.upload.maximum_size=28672 | |
flora.upload.speed=57600 | |
flora.upload.tool=avrdude | |
flora.upload.disable_flushing=true | |
flora.bootloader.low_fuses=0xff | |
flora.bootloader.high_fuses=0xd8 | |
flora.bootloader.extended_fuses=0xcb |
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
function sysex_handler(message) | |
local s = "" | |
for i = 4, #message-1 do | |
s = s..string.char(message[i]) | |
end | |
local args = {} | |
for arg in s:gmatch("%S+") do |
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
local devices = renoise.Midi.available_input_devices() | |
for i = 1, #devices do | |
if string.find(devices[i], "Teensy MIDI NG") then | |
renoise.Midi.create_input_device(devices[i], | |
midi_handler, | |
sysex_handler) | |
end | |
end |
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
function clamp_value(value, min_value, max_value) | |
return math.min(max_value, math.max(value, min_value)) | |
end | |
function handler_schedule_loop(args) | |
local rstart = tonumber(args[1]) | |
local rend = tonumber(args[2]) | |
local song = renoise.song |
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
#!/usr/bin/env ruby | |
# Assumes you have ImageMagick installed | |
class MakeAverages | |
def initialize base_name, ext, grouping, prefix = 'avg_' | |
@base_name = base_name | |
@ext = ext |
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
/* | |
An example sketch to show how to configure a WiFly RN XV with a Teensy 3.1. | |
For this example, the Teensy board was mounted on a breadboard, powered over USB. | |
Teensy GND and Vin are wired to + and - on the breadboard. | |
Teensy pins 7 and 8 (RX3 and TX3) are connected to the WiFly's pins 2 and 3 (TXD and RXD). |
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.h> is needed so that "settings.h" can refer to the String type. | |
// It just so happens that "RNXV.h" will load <Arduino.h> so we can skip | |
// the call here if we load "RNXV.h" first. | |
// #include <Arduino.h> | |
#include "RNXV.h" | |
#include "settings.h" | |
int led = 13; // For Teensy 3.1 | |
int ts = 0; |
OlderNewer