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
del jruby-core.jar | |
del ruby-stdlib.jar | |
rd /sq tmp_unpack | |
mkdir tmp_unpack | |
cd tmp_unpack | |
jar xf ../jruby-complete.jar | |
cd .. | |
mkdir jruby-core | |
move tmp_unpack/org jruby-core/ |
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
This example shows how to setup an environment running Rails 3 beta 3 under 1.9.2-head with a 'rails3' gem set. | |
∴ rvm update --head | |
# ((Open a new shell)) or do 'rvm reload' | |
# If you do not already have the ruby interpreter installed, install it: | |
∴ rvm install 1.9.2-head | |
# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist. | |
∴ rvm --create use 1.9.2-head@rails3 |
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
// possible fix for http://github.com/jquery/jquery-datalink/issues/#issue/2 | |
// added | |
var _oldval = $.fn.val; | |
$.fn.val = function(value) { | |
var result = null; | |
if (value == undefined) { | |
result = _oldval.call(this); | |
} | |
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
namespace :mongo do | |
def confirm(message) | |
print "\n#{message}\nAre you sure? [y/n] " | |
# STDIN is not supported on heroku :/ | |
raise 'Aborted' unless STDIN.gets.chomp == 'y' | |
end | |
desc "gets database" | |
task :db => :environment do |
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() { | |
// data comes from server | |
var data = {title: "header title", body: "body title", background_color: "#ffffff"}; | |
// setup site model and extend it with data from server | |
var Site = Backbone.Model.extend(data); | |
// header view | |
var HeaderView = Backbone.View.extend({ |
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
<cfscript> | |
// creates message ready for Twitter for given paramaters | |
function createTwitterMessage(name, amount, activity, technology, location) { | |
return "Help " & name & " collect " & amount & " for " & activity & " in " & location; | |
} | |
</cfscript> |
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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<a href="http://twitter.com/share" class="twitter-share-button" | |
data-url="http://www.energyincommon.org" | |
data-text="<cfoutput>#createTwitterMessage("Frist Name Last Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput>" | |
data-count="horizontal" data-via="energyincommon">Tweet</a> | |
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | |
</body> |
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
<cffunction name="createMessage"> | |
<cfargument name="name" required="true" type="string"> | |
<cfargument name="amount" required="true" type="string"> | |
<cfargument name="activity" required="true" type="string"> | |
<cfargument name="technology" required="true" type="string"> | |
<cfargument name="location" required="true" type="string"> | |
<cfreturn "Help " & name & " collect " & amount & " for " & technology & " (" & activity & ") in " & location> | |
</cffunction> |
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
<!-- message --> | |
<cfoutput>#createMessage("Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput> | |
<br /><br /> | |
<!-- facebook --> | |
<a name="fb_share" share_url="http://www.energyincommon.org" type="button">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> | |
<br /><br /> | |
<!-- twitter --> | |
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.energyincommon.org" data-text="<cfoutput>#createMessage("Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput>" data-count="horizontal" data-via="energyincommon">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
a { | |
text-decoration:none; | |
} | |
a:hover { | |
text-decoration:none; | |
} |
OlderNewer