Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Turtles

Ryan Allen ryan-allen

🐢
Turtles
View GitHub Profile
View hide-google-inbox-canned-reply-buttons.js
// ==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);
})();
View autohotkey.ahk
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
View circle.js
var Circle = function(radius) {
var calculateDiameter = function() {
return radius * 2
}
// here's a new 'circle'
return {
radius: radius,
calculateDiameter: calculateDiameter
}
View gist:897686
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!
View u-mad.txt
.........,....................,......,.............,......,........................
...,,..,...........................,......:,,::,,:,.,,,,:,.,,.........,...,..,,....
..,..,,.....,......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 Feb 2, 2011
recursive string scanner
View scan_until.php
<?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;
}
View unique.js
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 Nov 16, 2010
the fact that this works i think was worth all the effort
View unicode-methods.rb
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
View 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
View closure-unfail.rb
a, b = nil, nil
a = lambda {
b.call()
}
b = lambda {
puts :IMA_B_LOL
}