Skip to content

Instantly share code, notes, and snippets.

View FerreiraRaphael's full-sized avatar

Raphael Ferreira FerreiraRaphael

View GitHub Profile
@FerreiraRaphael
FerreiraRaphael / cloudSettings
Last active March 19, 2018 16:44
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-19T14:30:56.963Z","extensionVersion":"v2.9.0"}
@FerreiraRaphael
FerreiraRaphael / extract.sh
Created February 28, 2018 14:04
shell Extract function
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
return 1
else
for n in $@
do
if [ -f "$n" ] ; then
@FerreiraRaphael
FerreiraRaphael / .eslintrc.js
Created November 28, 2017 18:23
New React Env
{
"extends": ["airbnb", "prettier"],
"env": {
"browser": true,
"node": true,
"mocha": true
},
"globals": {
"describe": false,
"it": false,
@FerreiraRaphael
FerreiraRaphael / composicao-funcional.js
Last active October 19, 2017 01:21
Exemplos Seminário TACS
//Baixe este arquivo em https://gist.github.com/FerreiraRaphael/541090faceef655e9d949f5ce926f855
//Execute:
//node <nome-do-arquivo>.js
let resultadoEsperado, resultado;
//Composição funcional
const usuarios = [
{
id: 1,
nome: "Raphael"
@FerreiraRaphael
FerreiraRaphael / cloudSettings
Last active August 23, 2017 22:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-08-23T19:05:46.953Z","extensionVersion":"v2.8.3"}
@FerreiraRaphael
FerreiraRaphael / addsudo.sh
Created April 9, 2017 00:49
scripts for a clean debian
#!/bash/bin
#enable sudo to current user
apt-get install sudo
adduser whoami sudo
reset
@FerreiraRaphael
FerreiraRaphael / create_superuser_postgresql.sh
Last active October 16, 2023 12:43
How to install, config and create a superuser on postgresql fedora
#Login as root
su -
#Switch to postgres user
su postgres
#Connect to the DB
psql
#Create user
CREATE USER username SUPERUSER INHERIT CREATEDB CREATEROLE;
#Alter it`s password
ALTER USER username PASSWORD 'password';
@FerreiraRaphael
FerreiraRaphael / Preferences.sublime-keymap
Last active May 20, 2016 16:40
Sublime Text Preferences
[
{ "keys": ["ctrl+shift+o"], "command": "prompt_open_folder" },
{ "keys": ["shift+ctrl+i"], "command": "reindent", "args": {"single_line": false}},
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{ "keys": ["ctrl+;"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+;"], "command": "toggle_comment", "args": { "block": true } },
@FerreiraRaphael
FerreiraRaphael / fedora-init.sh
Last active August 19, 2016 01:25
Shells com meus apps favoritos do fedora
#!/bin/sh
#update fedora
sudo dnf upgrade
#dmenu
sudo dnf install dmenu
#Gnome Tweak Tools
sudo dnf install gnome-tweak-tool