Skip to content

Instantly share code, notes, and snippets.

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

Johnatan Brayan johnatanbrayan

🏠
Working from home
View GitHub Profile
# 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/jarvis/.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,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@johnatanbrayan
johnatanbrayan / History|-10074061|entries.json
Last active November 22, 2022 00:39
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///home/jarvis/Documents/development/my_projects/microservice-worker/hr-user/src/main/java/com/johnatanbrayan/hruser/controllers/UserController.java","entries":[{"id":"PMhc.java","timestamp":1653921307347},{"id":"XWy8.java","timestamp":1653935000343},{"id":"3nIe.java","timestamp":1653935341756},{"id":"AXoJ.java","timestamp":1653935571177},{"id":"7uPR.java","timestamp":1653935633073},{"id":"M2JO.java","timestamp":1653935729786},{"id":"v3W8.java","timestamp":1653935875186},{"id":"6AX7.java","timestamp":1653936486574},{"id":"tY9r.java","timestamp":1653948034301},{"id":"2dPJ.java","timestamp":1653997686805},{"id":"m0Nj.java","timestamp":1653997706044},{"id":"m4vB.java","timestamp":1653998470300},{"id":"PgfU.java","timestamp":1654000157420},{"id":"pDWL.java","timestamp":1654000220617},{"id":"vYlH.java","timestamp":1654002060570},{"id":"OtGe.java","timestamp":1654002199311},{"id":"AZVt.java","timestamp":1654003079111},{"id":"zc7Q.java","timestamp":1654004987444},{"id":"Il23.java","time
@johnatanbrayan
johnatanbrayan / heroku.txt
Created July 15, 2022 20:19
How to deploy Heroku CLI
# How to deploy Heroku CLI
heroku login
heroku create <name-app-api>
heroku git:remote -a <name-app-api>
git push heroku main
@johnatanbrayan
johnatanbrayan / commads
Last active March 29, 2022 13:52
Commands on linux
# Map the local rede
sudo nmap -sn 192.168.1.0/24
# mapper the ports on one ip
sudo nmap -sV 192.168.1.0
# Get IP
hostname -I
# List all ports tcp
@johnatanbrayan
johnatanbrayan / hashCodeAndEqual1.java
Last active March 9, 2022 00:42
How to create a hashCode and Equals
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Entity entity = (Entity) o;
if (entity.getId() == null || getId() == null) {
@johnatanbrayan
johnatanbrayan / Commands to run maven, npm projects
Last active February 18, 2022 21:57
Commands to run maven, npm projects
# How to create a maven wrapper on a project
mvn -N io.takari:maven:wrapper
# Build a container friendly executable skipping Tests
./mvnw -DskipTests -Pprod package
./mvnw -DskipTests -Pdev package
./mvnw -Pprod clean verify
# Run tests on backend:
./mvnw verify -P-webpack
@johnatanbrayan
johnatanbrayan / my_linux_settings:
Last active January 5, 2022 18:39
My checklist to configure linux
-appImageLauncher
-star-uml
-timeshift
-atril-document
-remmina
-virtual box
-iriun webcam
-docker
-ssh
-evillimiter
@johnatanbrayan
johnatanbrayan / Create a personalization resolution display on linux by terminal
Last active November 18, 2021 13:58
Create a personalization resolution display on linux by terminal
# Create a file .sh on directory /etc/profile.d
sudo vim /etc/profile.d/external_monitor_resol.sh
# List all monitors activated
xrandr --listactivemonitors // or xrandr --query | grep '\bconnected\b'
# Insert the script below on file created
sudo xrandr --newmode "2560x1080" 185.58 2560 2624 2688 2784 1080 1083 1093 1111 -HSync -Vsync
# Create other file on directory $HOME/.xprofile and change the permission
@johnatanbrayan
johnatanbrayan / Database - How to download a dump
Created November 8, 2021 21:59
Database - How to download a dump
## How to import dump on database:
cat your_dump.sql | docker exec -i your-db-container psql -U your-db-user -d your-db-name
# Ex:
cat dbnonecohom01-tcbapi_qa.dmp | docker exec -i 0eea92bb9447 psql -U tcbapi_qa -d db_tcb_main_qa
@johnatanbrayan
johnatanbrayan / Git and git flow commands
Last active October 15, 2021 02:22
Git and Git Flow commands
# Deletes all created files and directories
git clean -fd
# Undoes all changes by returning to the last recorded appointment
git reset --hard
# Remote branch list
git branch -r
# Put all files on stage area to commit