Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Lucas Macedo lucassmacedo

🎯
Focusing
Block or report user

Report or block lucassmacedo

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
@lucassmacedo
lucassmacedo / links.md
Created Aug 22, 2019 — forked from rogeriochaves/links.md
Pt-BR Data Science Links Scrapping
View links.md
View gist:d966f16d9ea46b2f2bdb8a5919a5083b
# Deleta todos processos de um certo nome
kill $(ps aux | grep 'phpstorm' | awk '{print $2}')
# Backup and Restore Database TAR PGQSL
PGPASSWORD="" pg_dump -h localhost -U postgres -F t database_name > /bkp/postgres/postgres-`hostname`-producao.tar
PGPASSWORD="" pg_restore -U postgres -d database_name /bkp/postgres/postgres-`hostname`-producao.tar
View gist:5be75e3702571e65bdd13144736a2798
####
# ATENTION:
# Replace all occurences of portal with your project's name
####
# v2 syntax
version: '2'
# Named volumes
volumes:
View gist:b977568960d43833b68b455816fdf1b7
library(sf)
library(ggplot2)
library("tmap")
library("tmaptools")
library (leaflet)
library (dplyr)
options (scipen =999)
library(DBI)
con <- dbConnect(RMariaDB::MariaDB(), host = "xx", user = "xx",dbname="xx",password = "xx")
@lucassmacedo
lucassmacedo / InstallJetBrain.sh
Created May 30, 2019
Install or update jetbrains products like PhpStorm, WebStorm, IntelliJ Idea, PyCharm, CLion, ReSharper on Ubuntu and fix problems with non latin hotkeys in gui java application
View InstallJetBrain.sh
#!/bin/bash
# installation jetbrains
j_url="https://data.services.jetbrains.com/products/download"
tmp_dir="$HOME/tmp_jb"
install_dir="/opt"
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
View gist:865045e98a1e9cffd982affac574672d
https://www.linuxuprising.com/2018/08/gpaste-is-great-clipboard-manager-for.html
https://github.com/KELiON/cerebro
View v
https://jtemporal.com
https://gopher.pro.br
https://greatercommons.com
https://github.com/avelino/awesome-go
https://golang.org/
https://golang.org/doc/
https://github.com/golang/go/wiki
https://tour.golang.org
https://gobyexample.com/
https://tour.golang.org/
View gist:deebace1dad9a428b412643aada61825
# https://wiki.postgresql.org/wiki/Getting_list_of_all_children_from_adjacency_tree
# https://www.depesz.com/2009/03/23/getting-list-of-all-children-in-adjacency-list-tree-structure/
CREATE OR REPLACE FUNCTION get_all_children_array(use_parent INT4) RETURNS INT4[] AS
$$
DECLARE
process_parents INT4[] := ARRAY [ use_parent ];
children INT4[] := '{}';
new_children INT4[];
BEGIN
WHILE (array_upper(process_parents, 1) IS NOT NULL)
You can’t perform that action at this time.