Skip to content

Instantly share code, notes, and snippets.

View vanhalt's full-sized avatar
💻
Building!

Rafa vanhalt

💻
Building!
View GitHub Profile
@vanhalt
vanhalt / kali-arm_raspberry3.md
Created March 30, 2016 05:38
Kali Linux ARM (kali-2.1.2-rpi2.img) running on Raspberry 3 with a 32GB micro sd
@vanhalt
vanhalt / ubuntu_elk_apache.md
Last active March 30, 2016 05:27
Ubuntu 14.04. Docker -> ELK (Logstash + Elasticsearch + Kibana for your Apache Logs)

Ubuntu info

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.4 LTS
Release:	14.04
Codename:	trusty
@vanhalt
vanhalt / seek_and_destroy.sh
Last active August 29, 2015 13:59
Bash processes a.k.a playing with 'ps'
ps -eo pid,command | grep 'writer' | cut -d ' ' -f 1 | xargs -I proceso kill -9 proceso
@vanhalt
vanhalt / workers_pids.sh
Created April 11, 2014 20:10
Dealing with Resque workers PIDs
# work to get working workers of work xD
# testing with resque-1.24
ps -Ao pid,stat,command | grep [r]esque |grep 'Forked'
# see the parent
ps -Ao pid,stat,command | grep [r]esque |grep 'Forked' |cut -d ' ' -f 7 |xargs -I padre ps padre
@vanhalt
vanhalt / how_to_use
Last active August 29, 2015 13:58
Installing rbenv and ruby 2.0
curl -O https://gist.githubusercontent.com/vanhalt/10298110/raw/8b97e642bc1365cf5ac7854ea916af56b5ff2046/install_rbenv_and_ruby.sh && bash install_rbenv_and_ruby.sh
@vanhalt
vanhalt / .bash_profile
Created July 23, 2013 16:04
Git branch in the bash prompt (PS1) OS X. My goal was not to use bash it or oh-my-zsh :) With this script your prompt shell will end like this: ~/my_name/a_dir_with_a_git_project [current_git_branch_name] >>
# Your stuffs
PATH="$PATH:/Users/your_name/bin" # add the python script to your path
PS1='\w [$(git_branch)] >> ' # the magic are the single quotes ;)
# more of your stuffs
@vanhalt
vanhalt / build-erlang-r16b_and_elixir093.sh
Last active March 28, 2016 04:19 — forked from bryanhunter/build-erlang-r16b.sh
Install Elixir v0.9.3 in Ubuntu 13.04
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://raw.github.com/gist/5487621/build-erlang-r16b.sh
# chmod u+x build-erlang-r16b.sh
# sudo ./build-erlang-r16b.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@vanhalt
vanhalt / fizz_buzz.rb
Last active December 18, 2015 20:59
Basic exercises with Ruby
[*1..100].each do |number|
text = ""
text << "fizz " if number % 3 == 0
text << "buzz " if number % 5 == 0
unless text.empty?
puts text
else
puts number
end
end