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
@johnatanbrayan
johnatanbrayan / Install intellij by tar.gz on linux
Last active September 26, 2020 15:05
How to install intellij by archive tar.gz on linux
# Open the directory /opt
cd /opt/
# Decompile the intellij archive
sudo tar -xvzf ~/Downloads/ideaIC-2020.2.tar.gz
# Change the name for better manipulation
sudo mv idea-IC-202.6397.94 idea
# Run the executable file
@johnatanbrayan
johnatanbrayan / Create a launcher on linux
Created September 26, 2020 00:09
Create a launcher image on linux ubuntu
# Create a launcher on directory /usr/share/applications
vim /usr/share/applications/app-name.desktop
# Create a file app-name.desktop and edit with exemple below:
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/opt/idea/bin/idea.svg
@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
@johnatanbrayan
johnatanbrayan / Install and configure JDK on linux
Last active April 25, 2021 21:50
Install and configure JDK on linux
## Method 01
// User JABBA OR SDKMAN to managing versions java
https://github.com/shyiko/jabba
https://blog.mattclemente.com/2019/05/31/managing-multiple-java-jdk-versions.html
// or
https://sdkman.io/
## Method 02
# Execute dpkg or gdebi
@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 / circle-button.css
Created September 26, 2020 22:27
Custom status button with interactivity
.btn {
font-size: 0.9rem;
&.btn-circle {
width: 35px;
height: 35px;
text-align: center;
padding: 6px 0;
font-size: 15px;
line-height: 1.428571429;
@johnatanbrayan
johnatanbrayan / viacep.ts
Created September 26, 2020 22:38
Script to search and fill in the address inputs automatically by searching by zip code on angular 10
// Install NgxViaCep with npm and follow the installation instructions
// Link: https://www.npmjs.com/package/@brunoc/ngx-viacep
constructor(private viacep: NgxViacepService) {}
/* ------------------------------------- CEP ------------------------------------ */
buscarCep(): void {
let cep: string = this.registerForm.get(['cep'])!.value;
if (cep) {
@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 / example-jhipster.jh
Last active September 27, 2020 01:26
One example of JDL Jhipster
entity Objet1 {
atributo1 String
atributo2 String
status Boolean
}
entity Objet2 {
atributo1 String
atributo2 String
status Boolean