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
## Puts a big annoying arrow in your window when you're not scrolled down, like a dummy | |
# | |
scrollAlert = $("<div id='scrolldown-arrow'>⬇</div>") | |
showing = false | |
body = $ document.body | |
win = $ window | |
doc = $ document |
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
# Used like this: | |
# {{#foreach "zone" in data.availability_zones}} | |
# <th>{{zone}}</th> | |
# {{/foreach}} | |
Handlebars.registerHelper "foreach", (keyword, blah, collection, ctx) -> | |
buffer = "" | |
copy = _.clone(this) | |
_.each collection, (i) -> | |
copy[keyword] = i |
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
// Save this file as: ~/Library/Application Support/LimeChat/inputPlugin.js | |
// And download this version of LimeChat that supports inputPlugin.js: | |
// http://cl.ly/0h3B3t3a3H3L | |
// | |
// That build of LimeChat includes this commit: | |
// https://github.com/zwily/limechat/commit/db1cdee2a4b90c3bc2e4956794d92f42a7264193 | |
// | |
// Shortens URLs that look like graphite using goo.gl. This could | |
// also be more generic, and just shortens any long URL (that will | |
// probably end up in a line being split by limechat to get around |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
def index | |
return unless tab_enabled?(@context.class::TAB_PAGES) | |
redirect_to named_context_url(@context, :context_wiki_page_url, 'front-page') | |
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
Russian Wheat Pancakes | |
Grandpa Wily | |
3/4 c whole wheat | |
1 c milk | |
2 T sugar | |
1/4 t salt | |
2 t baking powder | |
2 eggs | |
1/2 c oil |
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() { | |
setInterval(function() { | |
$(".reloadable").each(function(i) { | |
originalSrc = $(this).data('originalSrc'); | |
if (!originalSrc) { | |
originalSrc = $(this).attr('src'); | |
$(this).data('originalSrc', originalSrc); | |
} | |
$(this).attr('src', originalSrc + '&hack=' + new Date().getTime()); | |
}); |
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
def hashed_bip_pw(pw) | |
seed = '' | |
4.times { seed << Kernel.rand(256).chr } | |
str = seed + pw | |
Digest.hexencode(seed + Digest::MD5.digest(seed + Digest::MD5.digest(str))) | |
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
module Enumerable | |
def supermap(*args, &block) | |
res = [] | |
self.each do |e| | |
arr = [] | |
args.each { |a| arr << e.send(a) } | |
arr << block.call(e) if block | |
res << arr | |
end | |
res |