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
// ==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 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
// ==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 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
# 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 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
require "rubygems" | |
require "webrat" | |
require 'spec' | |
include Webrat::Matchers | |
output = " | |
<h1>Hallo Welt<h1> | |
<p>lorem</p> | |
<a name='demo' /> | |
" |
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
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! |
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
# Example how to use HTTParty | |
# see http://railstips.org/2008/7/29/it-s-an-httparty-and-everyone-is-invited | |
require 'rubygems' | |
require 'httparty' | |
require 'pp' | |
config = YAML::load(File.read(File.join(ENV['HOME'], '.delicious'))) | |
class Delicious | |
include HTTParty |
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
curl -k --user username:password -o backup.xml -O 'https://api.del.icio.us/v1/posts/all' | |
# or with wget | |
# wget --no-check-certificate --user=username --password=password -Obackup.xml https://api.del.icio.us/v1/posts/all | |
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
require 'rubygems' | |
require 'sinatra' | |
set :views, File.dirname(__FILE__) + '/' | |
get '/formgen.js' do | |
# form kann z.B. aus Datei gelesen werden | |
content = '<form id="form">'; | |
content += 'E-Mail: <input type="text" name="email" id="email"><br>'; | |
content += 'Text: <input type="text" name="message" id="message"><br>'; | |
content += '<input type="submit" value="send" id="send"></form>'; |
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
# =================== | |
# = Global Settings = | |
# =================== | |
set :application, "myapp" | |
set :domain, "family.bridge-mx11.de" | |
set :user, "deploy-familygame" | |
set :use_sudo, false | |
set :rails_env, "production" | |
# ======= |
OlderNewer