Skip to content

Instantly share code, notes, and snippets.

View .gitignorePhoneGap
# Mac
.DS_Store
# Node
npm-debug.log
/node_modules
# Cordova
/platforms
/plugins
@Vrakfall
Vrakfall / Enum.java
Last active Mar 31, 2016
IntelliJ Idea template for the creation of a new Java Enum
View Enum.java
#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 Mar 31, 2016
IntelliJ Idea template for the creation of a new Java Class
View Class.java
#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 Aug 9, 2016
IntelliJ Idea include template to pre-comment the inside and order the redaction of a Java Enum
View EnumInnerComments.java
//==== Static variables ====//
//==== Attributes ====//
//==== Getters ====//
//==== Constructors ====//
//==== Usual Methods ====//
@Vrakfall
Vrakfall / ClassInnerComments.java
Last active Aug 9, 2016
IntelliJ Idea include template to pre-comment the inside and order the redaction of a Java Class
View ClassInnerComments.java
//==== Static variables ====//
//==== Attributes ====//
//==== Getters and Setters ====//
//==== Constructors ====//
//==== Lists' CRUDs ====//
@Vrakfall
Vrakfall / substituteNoComment.sh
Last active Aug 29, 2015
Substitute anything excluding comments
View substituteNoComment.sh
#!/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