Skip to content

Instantly share code, notes, and snippets.

View sahajamit's full-sized avatar

Amit Rawat sahajamit

View GitHub Profile
@2sbsbsb
2sbsbsb / HTMLTableBuilder.java
Created June 18, 2012 23:43
Simple HTML Table Builder
/**
* Uses:
* HTMLTableBuilder htmlBuilder = new HTMLTableBuilder(null, true, 2, 3);
* htmlBuilder.addTableHeader("1H", "2H", "3H");
* htmlBuilder.addRowValues("1", "2", "3");
* htmlBuilder.addRowValues("4", "5", "6");
* htmlBuilder.addRowValues("9", "8", "7");
* String table = htmlBuilder.build();
* System.out.println(table.toString());
*/
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"