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
#header < img[src="http://s55905.gridserver.com/banner3.png"] { display:none } |
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 Object | |
def send_chain(meths) | |
result = self | |
meths.each do |m| | |
return nil if result == nil | |
if result.respond_to?(m) | |
result = result.__send__(m) | |
elsif result.respond_to?(:[]) | |
result = result[m] | |
else |
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 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
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
$vdiff_difftool = 'ksdiff' | |
require 'pp' | |
class Object | |
def vdiff(other) | |
require 'tempfile' | |
t1 = Tempfile.new(['vdiff', '.rb']) | |
t2 = Tempfile.new(['vdiff', '.rb']) | |
PP.pp self, t1 | |
PP.pp other, t2 |
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
# requires redmine 1.1.x for the REST API fixes | |
require 'rubygems' | |
gem 'activeresource' | |
require 'active_resource' | |
env = ARGV.shift | |
new_commit = ARGV.shift |
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
" i key | |
autocmd FileType eruby let b:surround_105 = "<%= t('\1key: \1', %{\r}) %>" | |
" o key | |
autocmd FileType eruby let b:surround_111 = "t('\1key: \1', \r)" | |
autocmd FileType ruby let b:surround_111 = "t('\1key: \1', \r)" |
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
<% ot 'criterion_for_assignment', 'For %{assignment} users must %{select_criterion}', :assignment => capture { %> | |
<span style="padding: 0 4px;"> | |
<select class="id assignment_picker"> | |
</select> | |
</span> | |
<% }, :select_criterion => capture { %> | |
<span style="padding: 0 4px;"> | |
<select class="type assignment_requirement_picker"> | |
<option class="any" value="must_view"><%= t('', %{view the item}) %></option> | |
<option class="assignment wiki_page discussion_topic" value="must_contribute"><%= t('requirements.must_contribute', %{contribute to the page}) %></option> |
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.1.7.1.js 2011-11-29 11:11:43.000000000 -0700 | |
+++ jquery.1.7.1.patched.js 2011-11-29 11:11:21.000000000 -0700 | |
@@ -560,6 +560,9 @@ | |
// Make sure leading/trailing whitespace is removed (IE can't handle it) | |
data = jQuery.trim( data ); | |
+ // Remove any prefixing while(1);, which is protection against CSRF | |
+ data = data.replace(/^while\(1\);/, ""); | |
+ | |
// Attempt to parse using the native JSON parser first |
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
[ { a: 5, b: 6} ] |
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
basically, POST to the lis_outcome_service_url URL with a XML body. | |
The sourcedId is the id passed to your tool, the resultScore is the score from 0.0 to 1.0. You'll need to set the content-type to application/xml, and sign the POST with your OAuth key and secret that you configured for the tool. | |
<?xml version = "1.0" encoding = "UTF-8"?> | |
<imsx_POXEnvelopeRequest xmlns = "http://www.imsglobal.org/lis/oms1p0/pox"> | |
<imsx_POXHeader> | |
<imsx_POXRequestHeaderInfo> | |
<imsx_version>V1.0</imsx_version> |
OlderNewer