Skip to content

Instantly share code, notes, and snippets.


Igor Elias igoreliasm

Block or report user

Report or block igoreliasm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View elasticsearch pt-br analyzer
//Cria o índice especificando quais os analyzer ele tem
//Além disso especifica que o campo "titulo" do tipo "seu_tipo" utiliza o analyzer recem criado
curl -XPUT "http://localhost:9200/my_index" -d'
"settings": {
"analysis": {
"analyzer": {
"analyzer_customizado": {
"tokenizer": "standard",
banaslee / XGH - en.txt
Last active Nov 14, 2019
eXtreme Go-Horse Process
View XGH - en.txt
eXtreme Go Horse (XGH) Process
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
squiter / Vagrantfile
Created Jul 5, 2012
[Abstraindo] Vagrant de forma simples - Arquivos finais
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby : do |config| = "lucid32"
config.vm.forward_port 80, 8080
config.vm.forward_port 3306, 8336
config.vm.provision :puppet do |puppet|
nilcolor / Node.js CORS
Created Feb 8, 2011
Node.js cross-origin POST. You should response for OPTIONS request first. Something like this.
View Node.js CORS
if (req.method === 'OPTIONS') {
var headers = {};
// IE8 does not allow domains to be specified, just the *
// headers["Access-Control-Allow-Origin"] = req.headers.origin;
headers["Access-Control-Allow-Origin"] = "*";
headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS";
headers["Access-Control-Allow-Credentials"] = false;
headers["Access-Control-Max-Age"] = '86400'; // 24 hours
headers["Access-Control-Allow-Headers"] = "X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept";
isaacs /
Last active Nov 7, 2019
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
You can’t perform that action at this time.