Skip to content

Instantly share code, notes, and snippets.

View andrewsmedina's full-sized avatar

Andrews Medina andrewsmedina

View GitHub Profile
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da
@andrewsmedina
andrewsmedina / node_reinstall.sh
Created May 16, 2011 01:27 — forked from coolaj86/node_reinstall.sh
Install Node.JS on Mac OS X or Linux
NUMBER_OF_CPU_CORES=2
BASHRC=~/.profile
# Remove old Node.JS installation
rm ~/local/*/node* -rf
rm ~/.node_libraries -rf
sudo rm /usr/local/*/node* -rf
sudo rm /usr/*/node* -rf

Selenium with Python

Author: Baiju Muthukadan
Email:baiju.m.mail AT gmail.com
Version: 0.3.2
@andrewsmedina
andrewsmedina / Makefile
Created December 5, 2011 01:03 — forked from turicas/Makefile
Create slugs using Python
test:
clear
nosetests --with-coverage --cover-package slugfy test_slugfy.py
clean:
find -regex '.*\.pyc' -exec rm {} \;
find -regex '.*~' -exec rm {} \;
.PHONY: test clean
Vagrant::Config.run do |global_config|
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027076")
fixed = (ENV['FIXED'] or "10.0.76.0/24")
global_config.vm.define :chef do |config|
suffix = "100"
ip = "#{ip_prefix}#{suffix}"
config.vm.box = "base"
package lxc
import (
"bytes"
"os/exec"
)
func LxcCreate(containerName, config string) error {
return exec.Command("sudo", "lxc-start", "--daemon", "-n", containerName).Start() {
}
@andrewsmedina
andrewsmedina / es.sh
Created April 17, 2012 00:08 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@andrewsmedina
andrewsmedina / gist:2402450
Created April 17, 2012 00:08 — forked from shaneog/gist:1198248
elasticsearch ubuntu 11.04
cd ~
# Install the required JDK
sudo apt-get install openjdk-6-jre-headless
# Download, extract and move ElasticSearch
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.6.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
@andrewsmedina
andrewsmedina / es.sh
Created April 17, 2012 00:08 — forked from shaneog/es.sh
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get install unzip
sudo apt-get install python-software-properties -y
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@andrewsmedina
andrewsmedina / robot.js
Created December 5, 2012 23:36
Overrun
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();