Skip to content

Instantly share code, notes, and snippets.

input {
tcp {
port => #port
}
}
output {
elasticsearch {
host => #host
port => #port
@dcrec1
dcrec1 / bash_profile.sh
Created April 23, 2009 15:47 — forked from henrik/.bashrc
show git branch
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='`rvm-prompt i v g` \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
require 'rubygems'
require 'twitter'
auth = Twitter::HTTPAuth.new 'planeta_spfc', 'xxxxxxxxxxx'
base = Twitter::Base.new auth
base.followers.select { |f| !f.following }.each do |f|
begin
base.friendship_create f.id
rescue
@dcrec1
dcrec1 / sand_traveler.rb
Created October 20, 2009 04:01
processing :: sand traveler
# After Jared Tarbell
# Description:
# Sand Traveler was a special commision, produced in Processing
# by Jared Tarbell for Sonar 2004, Barcelona.
# This Ruby port has been tweaked, half of the (non-running)
# code exorcised, color palette broadened, and done in negative.
# -- omygawshkenas
[user]
email = dc.rec1@gmail.com
name = Diego Carrion
[github]
user = dcrec1
[alias]
st = status
ci = commit
br = branch
set daemon 30
set mailserver localhost
set logfile /var/log/monit.log
set alert labs@gonow.com.br
set httpd port 2812 address localhost
allow localhost
allow <your ip address>
allow <your user-name>:<your password>
@dcrec1
dcrec1 / seeds.rb
Created April 29, 2010 15:07
State of Brazil for Spree
states = <<STATES
28,AC,Acre
28,AL,Alagoas
28,AP,Amapá
28,AM,Amazonas
28,BA,Bahia
28,CE,Ceará
28,ES,Espírito Santo
28,GO,Goiás
28,MA,Maranhão
<VirtualHost *:443>
ServerName server.name.com.br
DocumentRoot /var/local/apps/app_nme/public
SSLEngine on
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
SSLCertificateFile /opt/ssl/ssl.crt
SSLCertificateKeyFile /opt/ssl/ssl.key
</VirtualHost>
@dcrec1
dcrec1 / Rakefile.rb
Created June 2, 2010 00:45
Sinatra + RSpec
require 'spec/rake/spectask'
desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --color)
end
@dcrec1
dcrec1 / gitconfig
Last active September 5, 2015 09:24
[user]
email = dc.rec1@gmail.com
name = Diego Carrion
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p