Skip to content

Instantly share code, notes, and snippets.

View selckin's full-sized avatar

Thomas Matthijs selckin

View GitHub Profile
awful.key({ modkey, }, "m",
function(c)
c.maximized = not c.maximized
c.maximized_horizontal = c.maximized
c.maximized_vertical = c.maximized
c:raise()
end,
{ description = "maximize", group = "client" }
)
#!/bin/bash
git reflog expire --expire=now --all
git gc --prune=now
#!/bin/bash
# git filter-branch --index-filter 'git rm --ignore-unmatch -r --cached ":(exclude)foo"' --prune-empty -- --all
pattern="$1"
[[ -z ${pattern} ]] && exit 1
git filter-branch --index-filter "git rm --cached --ignore-unmatch ${pattern}" --tag-name-filter cat -f -- --all
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git reflog expire --expire=now --all
#!/bin/bash
if [[ ! -d .git ]]; then
echo "cwd not a git repo"
exit 1
fi
if [[ ! -f pom.xml ]]; then
echo "cwd has no pom.xml"
exit 1