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
#!/usr/bin/env ruby | |
# | |
# Brute-force way to retrieve all Github's repositories at once | |
# Usage: | |
# github_repos.rb clone # will clone all the user's repositories | |
# github_repos.rb clone test # will just clone 6 repositories for testing purposes | |
# github_repos.rb pull # will update all of the user's local repositories | |
# | |
# If you have forked repositories, the original sources will be added | |
# as remotes with the default 'forked_from' name, and a new 'forked_from' |
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
/* | |
* TypeHelpers version 1.0 | |
* Zoltan Hawryluk, Nov 24 2009. | |
* @see http://www.useragentman.com/blog/2009/11/29/how-to-detect-font-smoothing-using-javascript/ | |
* | |
* Released under the MIT License. http://www.opensource.org/licenses/mit-license.php | |
* | |
* Works for | |
* - IE6+ (Windows), | |
* - Firefox 3.5+ (Windows, Mac, Linux), |
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
#!/bin/sh -e | |
# Usage: license | |
# Prints an MIT license appropriate for totin' around. | |
# | |
# $ license > COPYING | |
year=`date "+%Y"` | |
cat <<EOF | |
Copyright (c) $year Chris Wanstrath | |
Permission is hereby granted, free of charge, to any person obtaining |
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
#!/usr/bin/env ruby | |
# | |
# Put this script in your PATH and download from onemanga.com like this: | |
# onemanga_downloader.rb Bleach [chapter number] | |
# | |
# You will find the downloaded chapters under /tmp/Bleach | |
# | |
require 'rubygems' | |
require 'mechanize' | |
require 'nokogiri' |
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 'httparty' | |
require 'time' | |
require 'active_support' | |
File.read("#{ENV['HOME']}/.gitconfig").match(/token = (\w+)/) | |
TOKEN = $1 | |
class Github | |
include HTTParty |
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
# Gems for Ruby 1.9.1 | |
gem install rails rails-sqlserver-2000-2005-adapter acts_as_tree acts_as_versioned activerecord-tableless annotate capistrano erubis haml haml-edge inherited_resources nifty-generators rack rack-cache racksh sqlite3-ruby will_paginate passenger | |
gem install cucumber rspec rspec-rails shoulda test-spec ZenTest autotest-fsevent autotest-growl autotest_screen email_spec factory_girl faker fakeweb log4r metric_fu mocha quietbacktrace rcov integrity webrat Selenium tarantula mash wirble hirb ruby2ruby RubyInline | |
gem install authlogic authlogic-oid bundler closure-compiler coderay compass cs-active_form dry_scaffold feed-normalizer formtastic has_scope hobo htmlentities validatable liquid newrelic_rpm paperclip responders searchlogic settingslogic thin tlsmail unicorn yui-compressor jammit lockdown | |
gem install BlueCloth lesstile markaby rdiscount RedCloth nokogiri libxml-ruby hpricot httparty httpclient mechanize rest-client xml-simple restfulie feedzirra prawn rss-client soap4r xmpp4r xm |
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 'open-uri' | |
# url dsl -- the ultimate url dsl! | |
# | |
# You just can't beat this: | |
# | |
# $ irb -r url_dsl | |
# >> include URLDSL | |
# => Object | |
# >> http://github.com/defunkt.json |
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 Comment | |
include MongoMapper::EmbeddedDocument | |
include Gravatarable | |
key :name, String | |
key :email, String | |
key :url, String | |
key :body, String | |
key :created_at, Time | |
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
#!/usr/bin/env ruby | |
# | |
# Brute-force way to retrieve all Github's repositories at once | |
# Usage: | |
# github_repos.rb clone # will clone all the user's repositories | |
# github_repos.rb clone test # will just clone 6 repositories for testing purposes | |
# github_repos.rb pull # will update all of the user's local repositories | |
# | |
# If you have forked repositories, the original sources will be added | |
# as remotes with the default 'forked_from' name, and a new 'forked_from' |
NewerOlder