Skip to content

Instantly share code, notes, and snippets.

View ryan-allen's full-sized avatar
🐢
Turtles

Ryan Allen ryan-allen

🐢
Turtles
View GitHub Profile
// ==UserScript==
// @name Hide Google Inbox Canned Reply Buttons
// @namespace http://tampermonkey.net/
// @version 0.1
// @match https://inbox.google.com/*
// ==/UserScript==
(function() {
document.styleSheets[0].insertRule("div.GP { display: none; }", 1);
})();
printscreen::f5
^printscreen::send {Control down}{f5}{Control up}
scrolllock::send {shift down}{f5}{shift up}
pause::send {shift down}{control down}{b}{shift up}{control up}
control::capslock
capslock::control
insert::media_play_pause
pgup::volume_up
pgdn::volume_down
var Circle = function(radius) {
var calculateDiameter = function() {
return radius * 2
}
// here's a new 'circle'
return {
radius: radius,
calculateDiameter: calculateDiameter
}
Hip hip hooray! It's Cogent Day!
Let's get together and share the love!
We're all Men, but that's OK!
Hip hip hooray! It's Cogent Day!
@ryan-allen
ryan-allen / u-mad.txt
Created April 1, 2011 03:15
problem?
.........,....................,......,.............,......,........................
...,,..,...........................,......:,,::,,:,.,,,,:,.,,.........,...,..,,....
..,..,,.....,......2illl▓▓███████████▓▓▓▓▓▓██▓.........,..,,..
,...,..,...,.k▓█▓▓▓▓lBEnjjBllllllBjzv░1JTHtq8tL;..,...nll█▓.......,...,,
..,......v▓█M:..,::,,:;1JBt;,...,....q:......:vFll▓▓llEL.....█▓,......,...
,...,.....█,,,...░;........;x,.......,:,,..,,:,,........,░,,,.....█lM.......,,
.....,:n█▓...,..Lii███▓B1........tj▓▓▓█████lM.,,........j█▓;......
...W██▓w,,..,Y▓▓█████M...k██▓▓▓█▓lll▓▓v▓▓▓▓▓;.▓█▓...
..#ll█::vn▓▓▓▓g;J:..,.t█▓................,n▓▓glll▓▓▓▓Wl▓▓.wll█..
...zi█;:..,..,t▓7▓▓░2ll█▓:......,.X▓Bq..,.........Bll▓▓█▓.El█3.F█lll
@ryan-allen
ryan-allen / scan_until.php
Created February 2, 2011 05:32
recursive string scanner
<?php
function scan_until($subject, $search, $position = 0, $match_position = 0, $buffer = '') {
$char = substr($subject, $position, 1); // take of a character
$position += 1; // increment our subject position
if ($position == strlen($subject)) { // are we at the end and haven't found shit?
return $subject;
}
var unique = function(array) {
var pushed = {}, output = []
for (n in array) {
var value = array[n]
if ( !pushed[value] ) {
output.push(value)
pushed[value] = true
}
}
return output
@ryan-allen
ryan-allen / unicode-methods.rb
Created November 16, 2010 05:31
the fact that this works i think was worth all the effort
def ¿
puts 'IMA UPSIDEDOWN QUESTIONMARK LOL'
end
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
@ryan-allen
ryan-allen / 1_pi.rb
Created November 16, 2010 02:16 — forked from geelen/1_pi.rb
def poop1(x,y)
Math.sqrt(x * x + y * y)
end
def poop2(x,y)
poop1(x,y) < 1
end
def random_poop
rand * 2 - 1
a, b = nil, nil
a = lambda {
b.call()
}
b = lambda {
puts :IMA_B_LOL
}