Skip to content

Instantly share code, notes, and snippets.

View Vrakfall's full-sized avatar

Jérémy Lecocq Vrakfall

View GitHub Profile
# Mac
.DS_Store
# Node
npm-debug.log
/node_modules
# Cordova
/platforms
/plugins
@Vrakfall
Vrakfall / Enum.java
Last active March 31, 2016 13:44
IntelliJ Idea template for the creation of a new Java Enum
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public enum ${NAME} {
#parse("EnumInnerComments.java")
}
@Vrakfall
Vrakfall / Class.java
Last active March 31, 2016 13:44
IntelliJ Idea template for the creation of a new Java Class
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
#parse("ClassInnerComments.java")
}
@Vrakfall
Vrakfall / EnumInnerComments.java
Last active August 9, 2016 16:18
IntelliJ Idea include template to pre-comment the inside and order the redaction of a Java Enum
//==== Static variables ====//
//==== Attributes ====//
//==== Getters ====//
//==== Constructors ====//
//==== Usual Methods ====//
@Vrakfall
Vrakfall / ClassInnerComments.java
Last active August 9, 2016 16:18
IntelliJ Idea include template to pre-comment the inside and order the redaction of a Java Class
//==== Static variables ====//
//==== Attributes ====//
//==== Getters and Setters ====//
//==== Constructors ====//
//==== Lists' CRUDs ====//
@Vrakfall
Vrakfall / substituteNoComment.sh
Last active August 29, 2015 14:19
Substitute anything excluding comments
#!/bin/bash
# Substitute anything in argument 1 by argument 2 in file of argument 3
# Expecting a GNU-sed
sed '/\/\/.*/! {\|*/|!{ s|/\*|\n&| #if ! */ repl 1st /* w/ \n/*
h; s|'$1'|'$2'|g;/\n/!b #hold; repl all foo/bar; if ! \n branch
G; s|\n.*\n||;:n #Get; clear difference; :new label
n; \|*/|!bn;s|^|\n/*| #new line; if ! */ branch new label
};s|*/|\n&|g #repl all */ w/ \n*/
s|'$1'|&\n'$2'|g;:r #repl all foo w/ foo\nbar