Skip to content

Instantly share code, notes, and snippets.

View gandrade's full-sized avatar
🏡
working @ home

Gustavo Andrade gandrade

🏡
working @ home
View GitHub Profile
@gandrade
gandrade / iterm2.md
Created July 29, 2020 12:46 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@gandrade
gandrade / mint-disable-touchscreen
Last active September 27, 2018 18:23
Workaround solution found to disable touchscreen on Linux Mint OS on Dell Vostro 5480
xinput set-prop "ELAN Touchscreen" "Device Enabled" 0
@gandrade
gandrade / App.java
Created August 30, 2018 00:13 — forked from treo/App.java
Chance.js Java integration is quite easy
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Random;
import java.util.function.Supplier;
public class App
@gandrade
gandrade / Test.java
Created January 19, 2018 17:47 — forked from nogweii/Test.java
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files
import javax.crypto.Cipher;
class Test {
public static void main(String[] args) {
try {
System.out.println("Hello World!");
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
System.out.println(maxKeyLen);
} catch (Exception e){
System.out.println("Sad world :(");
@gandrade
gandrade / java-repeat-string.md
Created December 6, 2017 01:33 — forked from umidjons/java-repeat-string.md
Repeat string N times without loop in Java

Repeat string N times without loop in Java

package javaapplication1;
public class JavaApplication1 {
    /**
     * Repeat string <b>str</b> <b>times</b> time.
     * @param str string to repeat
     * @param times repeat str times time
     * @return generated string
 */
@gandrade
gandrade / bash
Created November 28, 2017 14:20 — forked from jonashackt/bash
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
@gandrade
gandrade / 0_reuse_code.js
Created June 22, 2016 01:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
echo -en "\e]2;string\a"
npm list -g <node_package_name>
git config --global alias.pr = "pull --rebase"