brew install neovim/neovim/neovim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# references | |
# https://www.thegeekstuff.com/2012/08/lsof-command-examples/ | |
# list open network files | |
sudo lsof -PiTCP -sTCP:LISTEN | |
# list files opened by a process | |
lsof -c ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download dos shapefiles do IBGE | |
curl -s 'ftp://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2016/Brasil/BR/BR.zip' -o BR.zip | |
# abrir o pacote | |
unzip -j BR.zip | |
# instala o postgresql e o postgis | |
brew install postgis | |
# inicia o postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
require 'prime' | |
def ppn(n) | |
Prime.each(Float::INFINITY).lazy.select do |p| | |
p if p.to_s == p.to_s.reverse | |
end.first(n.to_i) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
""" | |
simplegeo/python-oauth2 basic 3-legged example adapted to Y! Sports OAuth API | |
references: | |
https://github.com/simplegeo/python-oauth2#twitter-three-legged-oauth-example | |
https://github.com/simplegeo/python-oauth2/issues/10 | |
http://stackoverflow.com/questions/4026759/problems-with-python-oauth2-and-yahoos-fantasy-sports-api | |
""" |
FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CKEditor configuration - Gaveteiro | |
// referencia: http://docs.ckeditor.com/#!/api/CKEDITOR.config | |
// https://github.com/galetahub/ckeditor#customize-ckeditor | |
CKEDITOR.editorConfig = function( config ) | |
{ | |
config.language = 'pt-br'; | |
config.height = 250; | |
config.allowedContent = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My helpers | |
# | |
def fwd_ports(config, ports=[]) | |
Array[*ports].each do |port| | |
config.vm.network :forwarded_port, guest: port, host: port | |
end | |
end | |
def share_folder(config, source, destiny) | |
if File.directory? File.expand_path(source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# CFLAGS="-arch x86_64 -g -O2" CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p247 | |
__install_ruby () { | |
local CFLAGS='-arch x86_64 -g -O2' | |
local READLINE=`brew --prefix readline` | |
local OPENSSL=`brew --prefix openssl` | |
if [ -d "$READLINE" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk -y | |
curl -XGET -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.tar.gz -o elasticsearch-0.20.5.tar.gz | |
tar -xf elasticsearch-0.20.5.tar.gz | |
mv elasticsearch-0.20.5 elasticsearch | |
sudo mv elasticsearch /usr/local/share |