Skip to content

Instantly share code, notes, and snippets.

View switowski's full-sized avatar
🐍
I'm Pythoning

Sebastian Witowski switowski

🐍
I'm Pythoning
View GitHub Profile
updated = run_sql("update bibrec_bibdoc set docname=%s where id_bibdoc=%s and id_bibrec=%s", (newname, self.id, recid))
if not updated:
raise InvenioBibDocFileError, "Docname for recid %s and bibdoc %s was not changed" % (recid, self.id)

Keybase proof

I hereby claim:

  • I am switowski on github.
  • I am switowski (https://keybase.io/switowski) on keybase.
  • I have a public key ASBkM6qHOktcVf74dd8HcNyamDEjGrQI6TqB-Ihg2Suf5go

To claim this, I am signing this object:

Prerequisites:

Checkout Invenio cookiecutter template:

$ git clone https://github.com/inveniosoftware/cookiecutter-invenio-module.git

1. Analyse module

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
mpr = "!f() { \
declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \
declare branch=\"${2:-$currentBranch}\"; \
if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
git fetch origin refs/pull/$1/head:pr/$1 && \
git checkout -B $branch && \
git rebase $branch pr/$1 && \
git checkout -B $branch && \
git merge --ff-only pr/$1 && \
git branch -D pr/$1; \
copr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && \
git checkout pr/$1; }; f"
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
aliases = config --get-regexp alias
git = !exec git