Skip to content

Instantly share code, notes, and snippets.

@immime
immime / git-reset-author.sh
Created March 26, 2022 02:52 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@immime
immime / ehs.java
Created April 15, 2021 10:49 — forked from jshiell/ehs.java
IntelliJ IDEA live template for Apache Commons Lang 3 Equals/HashCode/ToString
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
@immime
immime / setenv.sh
Created December 6, 2018 09:30 — forked from patmandenver/setenv.sh
Tomcat8 setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
@immime
immime / 0_reuse_code.js
Created April 14, 2017 17:10
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
@immime
immime / gist:e695a54b5ec64778ddb043ab8c7cb056
Created October 27, 2016 16:04 — forked from michail-nikolaev/gist:3840973
JPA - Tree structure with automatic order and tested operations for it
@Entity
public class TreeCategory extends IdentifiableEntity {
....
@ManyToOne(optional = true)
@JoinColumn(name = "parent_id", referencedColumnName = "id")
public TreeCategory getParent() {
return parent;
}
@immime
immime / nginx-ssl-config
Created December 9, 2015 10:00 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}