Skip to content

Instantly share code, notes, and snippets.

Jonas jonasvp

Block or report user

Report or block jonasvp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonasvp on github.
  • I am jonasvp ( on keybase.
  • I have a public key ASA7qVGmSQIT31YAbXu9OFjPGm-dIpcop6YZhQPPvlAwaQo

To claim this, I am signing this object:

jonasvp / show.html.erb
Last active Oct 13, 2015
Integrate Harvest Platform into redmine
View show.html.erb
<div style="position:absolute;left:1230px;" class="harvest-timer" data-project='{"id":"<%= %>", "name": "<%=j %>"}' data-item='{"id": "<%= %>", "name":"<%=j @issue.subject %>"'></div>
(function() {
window._harvestPlatformConfig = {
"applicationName": "Redmine",
"permalink": "https://YOUR.REDMINE.DOMAIN/issues/%ITEM_ID%"
var s = document.createElement('script');
s.src = '//';
s.async = true;
jonasvp /
Created Nov 1, 2011
Monthly budgets for harvest: cronjob for rotating projects
#!/usr/bin/env python
Harvest ( does not support setting monthly budgets for projects.
The recommended workaround is creating a new project every month. This script is
supposed to run on the first of every month and uses the Harvest API in order to
archive last month's projects and create new ones for the current month. Members
and tasks are automatically copied over to the new project.
Projects with monthly budgets need to fulfill two requirements:
1. They need to have a budget set
jonasvp / pre-commit
Created Mar 7, 2011
My .git/hooks/pre-commit - save yourself from embarassment using pyflakes
View pre-commit
TMPDIR=`mktemp -d`
git diff --cached --name-only --diff-filter=ACMR | xargs git checkout-index --prefix=$TMPDIR/ --
pyflakes $TMPDIR >$TMPFILE 2>&1
grep -v "unable to detect undefined names" $TMPFILE >$TMPFILE.2
egrep -v "migrations.*'(datetime|models)' imported but unused" $TMPFILE.2 >$TMPFILE
grep -rn "pdb.set_trace" $TMPDIR >>$TMPFILE
sed "s/^${TMPDIR//\//.}.//" $TMPFILE >$TMPFILE.2
You can’t perform that action at this time.