Skip to content

Instantly share code, notes, and snippets.

View hpgsantos's full-sized avatar
💭
coding

Henrique Pires hpgsantos

💭
coding
View GitHub Profile
#Install R and then following packages
#repr failed to create
yum install R-*
install.packages("evaluate", dependencies = TRUE)
install.packages("base64enc", dependencies = TRUE)
install.packages("devtools", dependencies = TRUE)
install_github('IRkernel/repr')
install.packages("dplyr", dependencies = TRUE)
install.packages("caret", dependencies = TRUE)
install.packages("repr", dependencies = TRUE)
@hpgsantos
hpgsantos / karate.gml
Created September 7, 2016 03:12 — forked from pravj/karate.gml
GML format of "Zachary's Karate Club" social network.[W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33, 452-473 (1977)]
Creator "Mark Newman on Fri Jul 21 12:39:27 2006"
graph
[
node
[
id 1
label "1"
]
node
[
@hpgsantos
hpgsantos / README.md
Last active May 7, 2017 00:36
Rocket.Chat Build With Personal Package

** About

@rckchat_pkg_build.sh @ is a simple bash shell script for compiling my personal projects with meteor and third part packages

** Installation

curl https://gist.githubusercontent.com/hpgsantos/dc003e2b8d2313665c507c6dd58f68e5/raw/a2130d0ea51ffb0b0b38497b5b477d0791a5b05e/rckchat_pkg_build.sh > rckchat_pkg_build.sh &&
chmod 755 rckchat_pkg_build.sh
@hpgsantos
hpgsantos / LetsEncrypt.md
Last active February 18, 2018 04:17 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

echo "HASH1.HASH2" > static/.well-known/acme-challenge/HASH1
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
sudo apt-get install bash-completion
sudo apt-get install --reinstall bash-completion
sudo vi /etc/bash.bashrc
# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
@hpgsantos
hpgsantos / output_intent.md
Last active February 23, 2018 13:42
output_intent.md

Request

Raw POST sample as JSON

http:///parse

{"q":"quero gerar o boleto de janeiro"}
{
"volume_vendas": {
"userEmail": "hpgoulart@gmail.com",
"volumeVendas": 28,
"percentile": 100,
"quintile": 4
},
"valor_venda": {
"userEmail": "hpgoulart@gmail.com",
"valorVendas": 753.00,
@hpgsantos
hpgsantos / rpkginstall.r
Last active March 29, 2018 13:04
r_packages_install
if(!require(XML)) install.packages('XML')
if(!require(data.table)) install.packages('data.table')
if(!require(geosphere)) install.packages('geosphere')
if(!require(rgdal)) install.packages("https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.2-5.tar.gz",repos=NULL, method="libcurl")
if(!require(rgeos)) install.packages("https://cran.r-project.org/src/contrib/Archive/rgeos/rgeos_0.3-23.tar.gz",repos=NULL, method="libcurl")
if(!require(gdalUtils)) install.packages('gdalUtils')
##system("sudo apt-get update --fix-missing && sudo apt-get install -y libgdal-dev libproj-dev")