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
For each Ruby module/class, we have Ruby methods on the left and the equivalent | |
Clojure functions and/or relevant notes are on the right. | |
For clojure functions, symbols indicate existing method definitions, in the | |
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can | |
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master, | |
ruby-to-clojure.*/* functions can be obtained from the source files in this | |
gist. | |
If no method symbol is given, we use the following notation: |
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
" Vim syntax file | |
" Language: HTML (version 5) | |
" Maintainer: Rodrigo Machado <[email protected]> | |
" URL: http://gist.github.com/256840 | |
" Last Change: 2010 Aug 26 | |
" License: Public domain | |
" (but let me know if you liked it :) ) | |
" | |
" Note: This file just adds the new tags from HTML 5 | |
" and don't replace default html.vim syntax file |
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
~/projects/jruby/tmp ➔ jruby -e "\$: << '../../maven_gem/lib'; require 'pom2gem.rb'; MavenGem::PomSpec.from_url('http://mirrors.ibiblio.org/pub/mirrors/maven2/org/clojure/clojure/1.0.0/clojure-1.0.0.pom')" | |
~/projects/jruby/tmp ➔ ls -l *.gem | |
-rw-r--r-- 1 headius staff 1372160 Dec 17 00:18 org.clojure.clojure-1.0.0-java.gem | |
~/projects/jruby/tmp ➔ gem install org.clojure.clojure-1.0.0-java.gem | |
Successfully installed org.clojure.clojure-1.0.0-java | |
1 gem installed | |
Installing ri documentation for org.clojure.clojure-1.0.0-java... | |
Installing RDoc documentation for org.clojure.clojure-1.0.0-java... |
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
// Provide string-matching based on fnmatch.3 | |
package fnmatch | |
// There are a few issues that I believe to be bugs, but this implementation is | |
// based as closely as possible on BSD fnmatch. These bugs are present in the | |
// source of BSD fnmatch, and so are replicated here. The issues are as follows: | |
// | |
// * FNM_PERIOD is no longer observed after the first * in a pattern | |
// This only applies to matches done with FNM_PATHNAME as well | |
// * FNM_PERIOD doesn't apply to ranges. According to the documentation, |
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
#!/bin/bash | |
read -p "Enter in part of public ssh key to search: " key | |
for f in `cut -d : -f 6 /etc/passwd`; do grep -nHs $key $f/.ssh/authorized_keys; done; |
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
~$ ARCHFLAGS='-arch i386 -arch x86_64' | |
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes | |
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download | |
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0 | |
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes | |
~/RubyCocoa-1.0.0$ ruby install.rb setup | |
~/RubyCocoa-1.0.0$ sudo ruby install.rb install |
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
When /^(.*) in the "([^\"]*)" section$/ do |action, title| | |
within "//*[(h1|h2|h3|h4|h5|h6|legend|caption)/descendant-or-self::*[contains(text(), '#{title}')]]" do | |
When action | |
end | |
end | |
When /^(.*) in the "([^\"]*)" row$/ do |action, title| | |
within "//*[(th|td)/descendant-or-self::*[contains(text(), '#{title}')]]" do | |
When action | |
end |
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
# Rack::SimpleServer | |
# | |
# a small rack app that acts like a basic HTTP server | |
# github.com/chendo | |
# | |
# Options: | |
# * :root => directory to expose | |
# e.g., use Rack::SimpleServer, :root => 'pub' | |
module Rack |
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
# http://libtorrent.rakshasa.no/wiki/RTorrentRatioHandling | |
ratio.enable = | |
ratio.min.set = 200 | |
ratio.max.set = 0 | |
ratio.upload.set = 0 | |
system.method.set = group.seeding.ratio.command, d.close=, d.erase= | |
# Link when finished. | |
system.method.set_key = event.download.finished, link_finished, "execute = mkdir, -p, ../done; execute = cp, -al, --, $d.get_base_path=, ../done/" |
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
# http://libtorrent.rakshasa.no/wiki/RTorrentRatioHandling | |
# Ratio 2.0, close & erase when done - erasing deletes torrents from rtorrent | |
ratio.enable = | |
ratio.min.set = 200 | |
ratio.max.set = 0 | |
ratio.upload.set = 0 | |
system.method.set = group.seeding.ratio.command, d.close=, d.erase= | |
# On completion, move the torrent to the directory from custom1. |
OlderNewer