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
# pretty much copied from active_support | |
module ModuleConstMissing | |
def self.append_features(base) | |
base.class_eval do | |
# Emulate #exclude via an ivar | |
return if defined?(@_const_missing) && @_const_missing | |
@_const_missing = instance_method(:const_missing) | |
remove_method(:const_missing) | |
end | |
super |
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
<html> | |
<head> | |
<title>Middle height</title> | |
<style type="text/css"> | |
/*Positioning CSS*/ | |
.container{ | |
overflow: hidden; | |
position: relative; |
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 humanized_seconds secs | |
[[60, :second], [60, :minute], [24, :hour], [1000, :day]].map{ |count, name| | |
name = name.to_s | |
if secs > 0 | |
secs, n = secs.divmod(count) | |
pluralized_name = n == 1 ? name : name.pluralize | |
"#{n.to_i} #{pluralized_name}" | |
end | |
}.compact.reverse.join(' ') | |
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
jQuery('.ghx-issue').each(function(){ | |
var | |
elem = jQuery(this), | |
id = elem.data('issue-id'), | |
title = elem.find('.ghx-key'), | |
edit_link = 'https://change.atlassian.net/secure/EditIssue!default.jspa?id='+id, | |
edit_node = '<a href="'+edit_link+'" class="issueaction-edit-issue" style="float: right">edit</a>'; | |
title.append(edit_node); | |
}); |
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
In Chrome: | |
Visit Adam Cobb's Beatport.com remix. | |
Open the menu "View" | |
Hover over "Developer" | |
Click "JavaScript Console" | |
You'll be presented with a strange window and a blinking cursor. Paste that code in the previous file (replay.js) and press Enter. The song will now continue to loop. Every time you refresh the page follow those steps. |
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
javascript:void(function()%7Bwindow.location.href=%22ssh://%22+window.location.href.match(/http:%5C/%5C/(%5B%5E:%5C/%5D+).+/)%5B1%5D%7D)(); |
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 Hey | |
def hi | |
puts "hi" | |
end | |
def sup &block | |
block.call | |
end | |
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 One | |
def go | |
1 | |
end | |
end | |
module Two | |
def go | |
2 | |
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
class Frog | |
def self.go | |
puts 45 | |
end | |
end | |
Frog.go | |
module Whatever |
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
require 'rubygems' | |
require 'rr' | |
extend RR::Adapters::RRMethods | |
module Something | |
def go | |
puts "going" | |
end | |
end |