Skip to content

Instantly share code, notes, and snippets.

View allanbatista's full-sized avatar

Allan Batista allanbatista

View GitHub Profile
@allanbatista
allanbatista / 0_reuse_code.js
Created August 5, 2016 16:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@allanbatista
allanbatista / 00.howto_install_phantomjs.md
Last active March 15, 2016 14:47 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu/Debian

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@allanbatista
allanbatista / mongod.service
Last active March 14, 2016 18:48 — forked from benileo/mongod.service
Systemd Service Script for Mongod On Ubuntu 15.04+
##
# UpStart mongod
# /lib/systemd/system/mongod.service
# sudo systemctl enable mongod.service
# sudo systemctl start mongod.service
[Unit]
Description=High-performance, schema-free document-oriented database
Documentation=man:mongod(1)
After=network.target
@allanbatista
allanbatista / master_pg_hba.conf
Created October 18, 2015 19:24 — forked from greinacker/master_pg_hba.conf
PostgreSQL 9.2.x replication
hostssl replication replicator 5.6.7.8 md5
@allanbatista
allanbatista / gist:adad3035d98caa0c6099
Last active September 8, 2015 19:26 — forked from marcelojunior/gist:3708804
Inflections PT-BR Rails
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/