This is an example implementation of find_each
with ActiveResource
- has_scope
#!/usr/bin/env ruby | |
`ifconfig -a`.split(/\n[^\t]/).each do |iface| | |
name = iface.match(/^(.*?):/)[1] | |
match = iface.match(/inet ((\d+\.?){4})/) | |
if match | |
inet = match[1] | |
puts "#{name}\t#{inet}" | |
end |
#!/usr/bin/env bash | |
tag_tracks () | |
{ | |
reg_name="s/^\([0-9]\{2\}\)___\(.*\)\.\(mp3\|ogg\)/\2/" | |
if [ -f ./Folder.jpg ]; then | |
img='./Folder.jpg' | |
else | |
if [ -f ../Folder.jpg ]; then |
#!/usr/bin/env bash | |
username=$1 | |
options=$2 | |
list='' | |
for r in `svn log | grep $username | sed 's/r\([0-9]\+\).*/\1/'`; do | |
list="$list -r$r" | |
done |
#!/usr/bin/env bash | |
BG_COLOR="#000000" # Background color | |
FG_COLOR="#662020" # Foreground color | |
DIMENSIONS="570x342" # Console dimensions | |
GRAVITY="NorthEast" # Text gravity (NorthWest, North, NorthEast, | |
# West, Center, East, SouthWest, South, SouthEast) | |
OFFSET="20,10" # Text offset | |
FONT_SIZE="60" # Font size in points | |
FONT_FAMILY="Monaco" # Font family |
*.swp | |
.DS_Store | |
.sass-cache | |
config/database.yml | |
db/schema.rb | |
log/* | |
public/stylesheets/*.css | |
tmp/* |
diff --git a/subversion/libsvn_subr/path.c b/subversion/libsvn_subr/path.c | |
=================================================================== | |
--- a/subversion/libsvn_subr/path.c | |
+++ b/subversion/libsvn_subr/path.c | |
@@ -35,6 +35,10 @@ | |
#include "private_uri.h" | |
+#if defined(DARWIN) | |
+#include <CoreFoundation/CoreFoundation.h> |
#!/usr/bin/env ruby | |
file = ARGV.first | |
branch = `git br --no-color | grep '^*' | cut -d' ' -f2`.gsub(/ref-(\d+)-.*/, '\1').strip | |
open('/tmp/git_debug', 'a') { |f| f.puts branch } | |
msg = '' | |
if branch =~ /^\d+$/s |
class Human | |
attr_reader :smart | |
def initialize | |
@smart = (rand == rand) | |
end | |
end |
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
fr: | |
devise: | |
confirmations: | |
confirmed: 'Votre compte a été validé.' | |
send_instructions: 'Vous allez recevoir les instructions nécessaires à la confirmation de votre compte dans quelques minutes.' | |
send_paranoid_instructions: 'Si votre e-mail existe dans notre base de données, vous allez bientôt recevoir un e-mail contenant les instructions de confirmation de votre compte.' | |
failure: | |
already_authenticated: "Vous êtes déjà connecté !" |