Skip to content

Instantly share code, notes, and snippets.

@luku
luku / leave.js
Created August 11, 2016 12:07
Are you sure?
var Omeka = Omeka || {};
Omeka.LeavePage = {
timer: null,
// list of events and selectors, that should let user leave page without showing warning
allow: {
// click: 'a.delete-confirm',
// 'click keydown': 'input#Delete',
},
message: 'It seems there are unsaved changes, that are going to be lost if you leave this page. Click "Leave page" to continue.'
};
@luku
luku / post-merge
Last active August 29, 2015 14:06 — forked from tonytamps/post-merge
#/usr/bin/env bash
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
project_root="$(git rev-parse --show-toplevel)"
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
go_run() {