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 jquery | |
#= require jquery-ui/datepicker | |
#= require jquery-ui/dialog | |
#= require jquery-ui/sortable | |
#= require jquery-ui/widget | |
#= require jquery_ujs | |
# | |
#= require_self | |
#= require_tree ./lib | |
#= require_tree ./ext |
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 jquery | |
<% if Gem.loaded_specs["jquery-ui-rails"].version >= Gem::Version.create("5.0.0") %> | |
#= require jquery-ui/datepicker | |
#= require jquery-ui/dialog | |
#= require jquery-ui/sortable | |
#= require jquery-ui/widget | |
<% else %> | |
#= require jquery.ui.datepicker | |
#= require jquery.ui.dialog | |
#= require jquery.ui.sortable |
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
if Rails.env.test? | |
require 'active_record/fixtures' | |
require File.expand_path('../../test/config/geocoder.rb', __FILE__) | |
DatabaseCleaner.strategy = :transaction | |
class DatabaseResetter | |
def self.start | |
DatabaseCleaner.start |
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 Account | |
def initialize(value = 0) | |
@deposit = value | |
@history = ['Account created with 0 deposit'] | |
end | |
def deposit | |
@deposit | |
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
// ==UserScript==// | |
// @name Kottke Blue Border Remover | |
// @namespace http://gist.github.com/49129 | |
// @description Gets rid of that annoying blue border wrapping kottke.org | |
// @include http://*.kottke.org | |
// @include http://*.kottke.org/* | |
// ==/UserScript== | |
var els = ['t', 'b', 'l', 'r', 'tl', 'tr', 'bl', 'br'] | |
for(var i in els) { |
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
// ==UserScript== | |
// @name dizifilm-forum opimisation | |
// @namespace http://gist.github.com/49961 | |
// @description better dizifilm-forum optimisation | |
// @include http://www.dizifilm.com/forum/* | |
// ==/UserScript== | |
var GM_JQ = document.createElement('script'); | |
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js'; | |
GM_JQ.type = 'text/javascript'; |
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
# simple rack-example | |
# for more see | |
# http://m.onkey.org/2008/11/17/ruby-on-rack-1 | |
# and | |
# http://m.onkey.org/2008/11/18/ruby-on-rack-2-rack-builder | |
require 'rubygems' | |
require 'rack' | |
class HelloWorld |
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 "webrat" | |
require 'spec' | |
include Webrat::Matchers | |
output = " | |
<h1>Hallo Welt<h1> | |
<p>lorem</p> | |
<a name='demo' /> | |
" |
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 'builder' | |
xml = Builder::XmlMarkup.new | |
xml.instruct!(:xml, :encoding => "UTF-8") | |
xml.person do |person| | |
person.firstname("Laura") | |
person.lastname("Croft",:married=>"No") | |
end | |
puts xml.target! |
OlderNewer