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
<pre style="font: 10px/5px monospace;"><span style="color: #f0ede4;"></span><span style="color: #f0ede4;">#</span><span style="color: #ddd9ce;">#</span><span style="color: #cadfaa;">#</span><span style="color: #cadfaa;">#</span><span style="color: #cadfaa;">#</span><span style="color: #ebe8dd;">#</span><span style="color: #f4f2a5;">#</span><span style="color: #e4ded3;">#</span><span style="color: #f0ede4;">#</span><span style="color: #ede8e2;">#</span><span style="color: #f0ede4;">#</span><span style="color: #f0ede4;">#</span><span style="color: #e4ded3;">#</span><span style="color: #ddd9ce;">#</span><span style="color: #ddd9ce;">#</span><span style="color: #fcfda5;">#</span><span style="color: #e9daab;">#</span><span style="color: #ddd9ce;">#</span><span style="color: #f0ede4;">#</span><span style="color: #f0ede4;">#</span><span style="color: #f0ede4;">#</span><span style="color: #f0ede4;">#</span><span style="color: #f0ede4;">#</span><span style="color: #e8e4db;">#</span><span style="color: #f0ede4;">#</spa |
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.py | |
import b | |
print 'hi dom' | |
# b.py | |
import a | |
print 'hi erik' |
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
tell application "iTunes" | |
repeat with t in selection | |
set da_name to (name of t) | |
set x to (offset of "." in da_name) + 2 | |
set y to (length of da_name) | |
set numbah to (text 1 thru ((offset of "." in da_name) - 1) of da_name) | |
set da_new_name to (text x thru y of da_name) | |
set name of t to da_new_name | |
set track number of t to numbah | |
end repeat |
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
// Just a quick hack for the cat lover in all of us | |
// Hijacks OMFGDOGS.com, and injects some Nyan Loveliness in there instead | |
// This is a bookmarklet! Copy and paste the code into an existing bookmark's URL, and rename it! | |
javascript:document.body.style.background='url(http://f.cl.ly/items/0x1J350B3E3t1h1b1m2r/0002.gif)';soundManager.stop('omfgdogs');soundManager.createSound({id: 'omfgnyan',url: 'http://iwantaneff.in/nyan.mp3',volume: 50,autoPlay: true,loops:999});void(0); |
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 ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
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
// First and foremost, go to the NCCC site and watch one of the Tufts videos. | |
// Next execute this code using your browser's javascript console. | |
// In Chrome, press command + option + j to open the developer console. Alternatively, navigate to View > Developer > JavaScript Console. Paste this whole test file into the console that just opened. | |
// In Firefox, use the Firebug extension to execute javascript. | |
// In other browsers, kill yourself. | |
// You must leave the window open for the code to keep voting for our dudes. | |
function destroy_this() { | |
vote.castVote(); |
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
// sonystyle ^_^ | |
int rand() { | |
return 1; | |
} |
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 Rake::DSL | |
def rebuild(relative) | |
puts "------ change detected in #{relative}" | |
if relative.pathmap("%x") == ".scss" | |
sh 'sass', '--no-cache', '-r', './sass/addons/bourbon/lib/bourbon.rb', relative, "../www/stylesheets/"+relative.pathmap("%n.css") | |
elsif relative.pathmap("%x") == ".haml" | |
sh 'haml', '-f', 'html5', relative, "../www/"+relative.pathmap("%n.html") | |
end | |
end |
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
window.onload = function() | |
{ | |
var headers = document.querySelectorAll('#docs h2, #guide h1'); | |
var menu = document.getElementById('menu'); | |
var init = menu.offsetTop; | |
var docked; | |
window.onscroll = function () | |
{ | |
if (!docked && (menu.offsetTop - scrollTop() < 0)) | |
{ |
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
# USAGE: | |
# ruby unshred.rb photo_name_1.png [photo_name_2.png] ... | |
# | |
# it will create an unshredded photo with the original name with "unshredded" prepended | |
# | |
require 'RMagick' | |
include Magick | |
SHRED_WIDTH = 32 |
NewerOlder