Skip to content

Instantly share code, notes, and snippets.

View jesherdevsk8's full-sized avatar
🐧
👨‍💻

Jesher Minelli jesherdevsk8

🐧
👨‍💻
View GitHub Profile
#!/bin/bash
### Variáveis
PROGRAMAS_APT=(
git
git-flow
google-chrome-stable
deepin-terminal
deepin-screen-recorder
gnome-tweak-tool
@jesherdevsk8
jesherdevsk8 / comandos-docker
Created April 21, 2022 01:17 — forked from morvanabonin/comandos-docker
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@jesherdevsk8
jesherdevsk8 / Vagrantfile
Created June 1, 2022 18:37 — forked from jacksonpires/Vagrantfile
Vagrantfile para a Box Ubuntu Rails Dev
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "jacksonpires/ubuntu-rails-dev"
config.vm.box_version = "1.0.0"
config.vm.network :forwarded_port, guest: 3000, host: 3000 # rails
config.vm.network :forwarded_port, guest: 9292, host: 9292 # rack
config.vm.network :forwarded_port, guest: 4567, host: 4567 # sinatra
@jesherdevsk8
jesherdevsk8 / .irbrc
Created June 13, 2022 11:27
pry working reload! like irb
require 'rubygems'
require 'pry'
if defined?(Rails) && Rails.env
if defined?(Rails::ConsoleMethods)
include Rails::ConsoleMethods
else
def reload!(print=true)
puts "Reloading..." if print
ActionDispatch::Reloader.cleanup!
@jesherdevsk8
jesherdevsk8 / Vagrantfile
Created June 14, 2022 17:25
Vagrantfile Centos7 provisionada
Vagrant.configure("2") do |config|
config.vm.box = "jesherpinkman/Centos7"
config.vm.network "forwarded_port", guest: 80, host: 8089
config.vm.network "public_network", bridge: "wlp2s0"
config.vm.provision "shell", inline: <<-SHELL
sudo curl -o /etc/yum.repos.d/konimex-neofetch-epel-7.repo https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo
sudo yum update -y
programas=( epel-release
nginx
@jesherdevsk8
jesherdevsk8 / jeshfetch
Created August 23, 2022 19:54
Cabeçalho para terminal
#!/usr/bin/env bash
# Include 'os-release' to grab OS pretty name...
. /etc/os-release
# Styles...
red="$(tput setaf 1)"
bold="$(tput bold)"
@jesherdevsk8
jesherdevsk8 / README.md
Created September 28, 2022 14:41 — forked from subfuzion/README.md
How to use Docker bind mount instead of copying files for a local dev container.

Example of a Docker bind mount.

Create an example directory and copy the following script to it. Make it executable and then run it.

$ chmod +x demo.sh
$ ./demo.sh
.
.
.
@jesherdevsk8
jesherdevsk8 / curl.md
Created September 28, 2022 14:45 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jesherdevsk8
jesherdevsk8 / jwt-decode.sh
Created February 23, 2023 20:02 — forked from angelo-v/jwt-decode.sh
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@jesherdevsk8
jesherdevsk8 / inventory.ini
Last active March 24, 2023 23:19
Ansible update automation VPS
## Please check out your ssh configurations for connections hosts
[MyServers]
ubuntu ansible_host=< SERVER_IP >
oracle-linux ansible_host=< SERVER_IP >
[all:vars]
ansible_python_interpreter=/usr/bin/python3