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
# Fake `svnlook` for testing prupose. | |
# ./fake_svnlook.rb changed /home/pouet/blah/svn/kikoo -r 3483 | |
# ^-- will just read /tmp/fakeSvn.3483 :) | |
abort 'only the `changed` keyword is allowed on fake_svnlook' if ARGV[0] != 'changed' | |
abort 'only the `-r` option is supported on fake_svnlook' if ARGV[2] != '-r' | |
abort "svnlook: No such revision #{ARGV[3]}" unless File.exists?(fake_svn = "/tmp/fakeSvn.#{ARGV[3]}") | |
puts File.read(fake_svn) |
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
function is-git? { | |
git status &> /dev/null | |
[ $? != 128 ] | |
} | |
function git-init-remote { | |
name=$(basename $PWD).git | |
path=~/repositories/$name | |
if is-git? | |
then |
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
function is-git? { | |
git status &> /dev/null | |
[ $? != 128 ] | |
} | |
function git-init-remote { | |
name=$(basename $PWD).git | |
path=~/repositories/$name | |
if is-git?; then | |
ssh bearnaise.net -t "mkdir $path && cd $path && git --bare init" || |
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 python | |
# Written by Antoine 'NaPs' Millet | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2004 Sam Hocevar | |
# 14 rue de Plaisance, 75014 Paris, France | |
# Everyone is permitted to copy and distribute verbatim or modified |
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
# irb(main):001:0> h = {} | |
# => {} | |
# irb(main):002:0> h.foo = "bar" | |
# => "bar" | |
# irb(main):003:0> h.foo | |
# => "bar" | |
class Hash | |
def method_missing(method, *params) | |
method_string = method.to_s |
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
# The infamous Monkey-Hash. Example: | |
# h = {} | |
# h.foo = "bar" | |
# h.foo # => "bar" | |
class Hash | |
def method_missing(method, *params) | |
key = method.to_s | |
if key =~ /=$/ | |
key = key[0..-2] |
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 | |
class String | |
def truncate(length = 30, truncate_string = "...") | |
return self if self.length <= length | |
short_length = length - truncate_string.length | |
self[0...short_length] + truncate_string | |
end | |
end | |
def date |
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 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 python2.6 | |
# | |
# Riff, rock, and much more !! | |
# | |
# Copyright 2008 Antoine Millet <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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
<?php | |
/* | |
Plugin Name: Sunnytize | |
Plugin URI: | |
Description: A better file name sanitizer | |
Version: 2.0 | |
Author: Sunny Ripert, Bastien Maillard, Guillaume Morisseau | |
Author URI: http://sunfox.org | |
*/ |
OlderNewer