Skip to content

Instantly share code, notes, and snippets.

View jfollmann's full-sized avatar
🏠
Working from home

Jefferson Follmann jfollmann

🏠
Working from home
View GitHub Profile
@jfollmann
jfollmann / .zshrc
Last active July 26, 2021 19:34
zsh configs
# cat ~/.zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/${USER}/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
// Examples of https://medium.com/@alvaro.saburido/set-theory-for-arrays-in-es6-eb2f20a61848
const arrA = [1, 3, 4, 5];
const arrB = [1, 2, 5, 6, 7];
const intersection = arrA.filter((x) => arrB.includes(x));
console.log('Intersection: ', intersection);
console.log('Expected: [1,5]');
const difference = arrA.filter((x) => !arrB.includes(x));
console.log('\nDifference: ', difference);
@jfollmann
jfollmann / letsencrypt
Last active September 28, 2020 19:34
Geração de Certificado SSL com Let's Encrypt
Geração de certificado SSL com o Let's Encrypt
#1) Instalação
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot
#2) Geração de um novo certificado
@jfollmann
jfollmann / Backup MongoDB.md
Last active April 18, 2020 05:07
Backup mongo db's in shellscript with azure storage upload

Backup mongo db's in shellscript with azure storage upload

Add docker-compose in PATH

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

.env file

@jfollmann
jfollmann / TOTVS - Printer-Addrs
Last active February 12, 2020 14:13
TOTVS - Printer-Addrs
1) sudo apt-get install smbclient
2) Additional Printer Settings
3) Add
4) Network Printer > Windows Printer via SAMBA
4.1) URL: smb://10.51.1.120/POACloudPrinter-Mono
4.2) User: poa01\jefferson.follmann
4.3) LexMark > MX510
@jfollmann
jfollmann / findhardlinks.sh
Last active January 28, 2020 14:10
Script to find hard links in linux
@jfollmann
jfollmann / README.md
Created January 15, 2020 17:20 — forked from diego3g/README.md
Criação de servidor Node.js

Configuração do servidor

  1. Configurar chave SSH
  2. Criar Droplet
  3. Realizar update e upgrade
  4. Crua usuário adduser deploy e usermod -aG sudo deploy
  5. Cria pasta .ssh pro deploy
  6. cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keys
  7. chown -R deploy:deploy .ssh/
  8. chmod 700 .ssh
@jfollmann
jfollmann / dracula-terminator
Created January 3, 2020 16:49
Dracula color scheme for Terminator
(Reference: https://github.com/ItsJimi/dracula-terminator)
dracula-terminator
Dracula color scheme for Terminator
Install
Put config file in ~/.config/terminator/
[global_config]
@jfollmann
jfollmann / .gitconfig
Last active January 3, 2020 12:34
Git configuration file
# This is Git's per-user configuration file.
[color]
ui = auto
status = auto
diff = auto
branch = auto
interactive = auto
[user]
name = Jefferson Follmann
email = jeff.follmann@gmail.com
@jfollmann
jfollmann / snippets.sh
Created December 17, 2019 12:31 — forked from IlyaKisil/snippets.sh
[Snippets] Snippets for bash
#!/usr/bin/env bash
set -e
function help() {
local _FILE_NAME
_FILE_NAME=`basename ${BASH_SOURCE[0]}`
cat << HELP_USAGE