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 | |
# WTFPL | |
require 'wavefile' | |
TWO_PI = 2 * Math::PI | |
SAMPLE_RATE = 44100 | |
timestamps = [] | |
time_zero=nil |
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/env ruby | |
# WTFPL | |
code = { | |
'A' => '.-', 'N' => '-.', '0' => '-----', | |
'B' => '-...', 'O' => '---', '1' => '.----', | |
'C' => '-.-.', 'P' => '.--.', '2' => '..---', | |
'D' => '-..', 'Q' => '--.-', '3' => '...--', | |
'E' => '.', 'R' => '.-.', '4' => '....-', | |
'F' => '..-.', 'S' => '...', '5' => '.....', | |
'G' => '--.', 'T' => '-', '6' => '-....', |
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
--- a/notification.c | |
+++ b/notification.c | |
@@ -443,11 +443,11 @@ int notification_init(notification * n, int id) | |
n->start = 0; | |
if (n->icon == NULL) { | |
- n->icon = strdup(settings.icons[n->urgency]); | |
- } | |
- else if (strlen(n->icon) <= 0) { | |
- free(n->icon); |
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 Add tracker link | |
// @namespace http://gist.github.com/encrypt94 | |
// @version 0.3 | |
// @description Add link "Add tracker" to ebay "Wait shipping" page | |
// @author encrypt <encrypt@labr.xyz> | |
// @include http://k2b-bulk.ebay.it/ws/eBayISAPI.dll?SalesRecordConsole&status=WaitShipment* | |
// @grant GM_openInTab | |
// @grant none | |
// ==/UserScript== |
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
require 'adb-sdklib' | |
require 'chunky_png' | |
adb = AdbSdkLib::Adb.new | |
device = adb.devices.first | |
screen = device.screenshot | |
image = ChunkyPNG::Image.new(screen.width, screen.height, ChunkyPNG::Color::TRANSPARENT) | |
screen.each_pixel do |p| | |
image[p.x,p.y] = ChunkyPNG::Color.rgba(p.red, p.green, p.blue, p.alpha) |