Skip to content

Instantly share code, notes, and snippets.

View GoncaloPT's full-sized avatar
💭
Glorified Janitor

Gonçalo Silva GoncaloPT

💭
Glorified Janitor
View GitHub Profile
@GoncaloPT
GoncaloPT / gist:1f7fc83073ccf615518adba4f67cb236
Created April 19, 2022 07:46
archetype for java17 with junit5
mvn archetype:generate \
-DarchetypeGroupId=pt.goncalo \
-DarchetypeArtifactId=java17withJunit \
-DgroupId=pt.goncalo \
-DartifactId=XXXXXX
"PROXY 160.46.203.229:8443"
package pt.goncalo.freeroam.lambda;
public class LambdaExpressions {
interface Payback<T>{
T apply(T origin, T rate);
}
static void calculate(Double origin, Double rate, Payback<Double> func){
double payback = func.apply(origin,rate);
@GoncaloPT
GoncaloPT / remove-ds-store-from-repo.txt
Last active July 28, 2020 18:34
Remove .DS_Store files from a Git repository?
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
echo .DS_Store >> .gitignore
git add .gitignore
git commit -m '.DS_Store banished!'