Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 "rack/client" | |
require "rack/cache" | |
require "rack/test" | |
app = Rack::Builder.new { | |
use Rack::Cache, | |
:verbose => true, | |
:metastore => "heap:/", | |
:entitystore => "heap:/" | |
run Rack::Client |
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
@client ||= Rack::Client.new(@base_uri) do | |
use Rack::Client::Auth::Basic, @user, @pass | |
use Rack::Client::ParseXml | |
run Rack::Client::Handler::NetHTTP | |
end | |
@client.get('/foo.xml') |
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 extends the behavior of Rake to allow you to see all of the dependencies | |
# of a Rake task recursively, not just the immediate dependencies. | |
# | |
# It adds a -d option (also called --dependency-tree). Left blank, this | |
# option shows you dependencies for all Rake tasks. Alternatively, you | |
# can pass a regular expression to this option and it will only show | |
# dependencies for matching tasks. | |
# | |
# To use this special version of Rake, save it in a Ruby file called | |
# raketree.rb (but the name really doesn't matter). Here are some examples of |
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 'tempfile' | |
require 'mechanize' | |
# *.txt format: | |
# ---------------------------------------------- | |
# http://your/track/wiki/page 1(version nuber) | |
# contents | |
# : | |
# : |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.0' | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
group :development, :test do | |
gem 'rspec','>=2.0.0.beta.20' | |
gem 'rspec-rails','>=2.0.0.beta.20' | |
gem 'ZenTest' | |
gem 'autotest' |
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
group :test do | |
gem 'rspec-rails', '>= 2.0.0.beta', :group => :development | |
gem 'rspec-integration', '>= 2.0.0.beta' | |
gem 'rr' | |
gem 'database_cleaner' | |
gem 'capybara' | |
gem 'launchy' | |
gem 'autotest-rails' | |
gem 'machinist_mongo', :require => 'machinist/mongoid' |
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:document.addEventListener('gesturestart',function()%7Bvar%20w=window.getSelection();if(w!=%22%22)window.location='mkdaijirin://jp.monokakido.DAIJIRIN/search?text='+encodeURIComponent(w)+'&srcname=Safari&src='+encodeURIComponent(location.href)%7D,false); | |
/* | |
前準備: | |
上記をiPhoneのSafariのブックマークとして登録 | |
使い方: | |
1. Safariでブラウジング中調べたい単語が見つかったら,ブックマークレットを起動する | |
(この段階では何も起こらない.実際にはユーザーがタッチパネル上で何らかのジェスチャーを行なったときに | |
発動するイベントがページに仕込まれる) |
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
// | |
// TeamCityAdadpter.m | |
// Created by Johannes Rudolph on 27.05.11. | |
// Use of this source code is governed by the following license: | |
// | |
// Redistribution and use in source and binary forms, with or without modification, | |
// are permitted provided that the following conditions are met: | |
// | |
// (1) Redistributions of source code must retain the above copyright notice, |
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
use 5.14.1; | |
use Plack::Request; | |
use Plack::Builder; | |
use FindBin; | |
use Text::Xslate::Util qw/html_escape/; | |
use POSIX qw/strftime/; | |
use List::Util qw/first/; | |
use JSON::XS; | |
use IO::Handle; | |
use Encode; |
OlderNewer