This file contains hidden or 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
{ | |
"Radio": [ | |
{ | |
"frequency": 91, | |
"inRange": true, | |
"active": true, | |
"text": "Classical Radio" | |
}, | |
{ | |
"frequency": 98, |
This file contains hidden or 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
Version 1.0.0 (05/02/2015) - Initial release | |
Version 1.0.1 (05/02/2015) - Added trixiebooru.org to the include list | |
Version 1.0.2 (05/26/2015) - Added icon to gallery slideshow button to match the May 2015 UI update | |
Version 1.0.3 (05/31/2015) - Changes to gallery slideshow button for May 2015 UI update (fixed positioning and made text hide on mobile) | |
Version 1.0.4 (06/06/2015) - Major refactoring, fixed some occurrences of duplicate history states and changed the behavior of the slideshow button on gallery pages | |
Version 1.1.0 (06/07/2015) - Added fave/upvote/downvote/comment buttons and scores | |
Version 1.1.1 (07/05/2015) - Fixed a bug that prevented the slideshow button from working on tag pages | |
Version 1.1.2 (07/19/2015) - Fixed a bug that prevented the slideshow button from working on search pages | |
Version 1.2.0 (07/20/2015) - Added HTML5 fullscreen capability | |
Version 1.2.1 (08/04/2015) - Bugfixes |
This file contains hidden or 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 math | |
def rgb_to_hsv(r, g, b): | |
r = float(r) | |
g = float(g) | |
b = float(b) | |
high = max(r, g, b) | |
low = min(r, g, b) | |
h, s, v = high, high, high |
This file contains hidden or 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
#include "headers.h" | |
using namespace llvm; | |
using namespace std; | |
struct codegen { | |
enum insn_name { | |
ptr_increment, // > | |
ptr_decrement, // < | |
value_increment, // + |
This file contains hidden or 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
"""" | |
The orignal author: Alexer / #python.fi | |
""" | |
import opcode | |
import dis | |
import sys | |
import multiprocessing |
This file contains hidden or 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
/** | |
* Stop an iframe or HTML5 <video> from playing | |
* @param {Element} element The element that contains the video | |
*/ | |
var stopVideo = function ( element ) { | |
var iframe = element.querySelector( 'iframe'); | |
var video = element.querySelector( 'video' ); | |
if ( iframe ) { | |
var iframeSrc = iframe.src; | |
iframe.src = iframeSrc; |
This file contains hidden or 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 simple proxy server. Usage: | |
http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: | |
http://localhost:8080/p/www.google.com | |
""" |
This file contains hidden or 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
# Turn off that annoying start up message | |
startup_message off | |
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature" | |
vbell off | |
terminfo xterm-color hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l | |
term xterm-color | |
# Window list at the bottom. hostname, centered tabs and redmarked active windows: |
This file contains hidden or 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
try | |
delay 15 -- adjust delay as needed | |
repeat 40000 times | |
try | |
tell application "Finder" to close every window | |
delay 0.09 -- adjust delay as needed | |
set theDigit to func(37) | |
on error | |
do shell script "killall Finder" | |
delay 10 -- adjust delay as needed |
This file contains hidden or 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 Color(object): | |
""" | |
utility to return ansi colored text. | |
""" | |
colors = { | |
'black': 30, | |
'red': 31, | |
'green': 32, | |
'yellow': 33, |