- install Tampermonkey
- Click here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
if len(sys.argv) > 1: | |
print os.getpid(), " ".join(sys.argv[1:]) | |
else: | |
os.execv(sys.executable, [sys.executable] + sys.argv + ['hello', str(os.getpid())]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_fk_on(cr, table, ignored): | |
q = """ SELECT cl1.relname as table, | |
att1.attname as column | |
FROM pg_constraint as con, pg_class as cl1, pg_class as cl2, | |
pg_attribute as att1, pg_attribute as att2 | |
WHERE con.conrelid = cl1.oid | |
AND con.confrelid = cl2.oid | |
AND array_lower(con.conkey, 1) = 1 | |
AND con.conkey[1] = att1.attnum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -z "$SSH_TTY" ]; then | |
exit 3 | |
fi | |
LOGINTIME=`last -RF ${SSH_TTY:5} | head -n1 | awk '{print $6}'` | |
MATCH=`echo $USER $SSH_CLIENT | awk '{print " Accepted publickey for " $1 " from " $2 " port " $3 " ssh2"}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool = function(o) | |
if not o then | |
return false | |
elseif o == '' then | |
return false | |
elseif o == 0 then | |
return false | |
elseif #o == 0 then | |
return false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'addons/web/static/src/js/chrome.js' | |
--- addons/web/static/src/js/chrome.js 2013-02-13 14:39:53 +0000 | |
+++ addons/web/static/src/js/chrome.js 2013-02-19 22:08:07 +0000 | |
@@ -1323,8 +1323,9 @@ | |
}, | |
on_hashchange: function(event) { | |
var self = this; | |
- var state = event.getState(true); | |
- if (!_.isEqual(this._current_state, state)) { | |
+ var stringstate = event.getState(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: openerp | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start openerp daemon at boot time | |
# Description: Enable service provided by daemon. | |
# X-Interactive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# set -x | |
set -e | |
set -o pipefail | |
if [[ -z "$1" ]];then | |
echo "Usage: $0 [-k] DB [TO]" >&2 | |
exit 1 | |
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the editorconfig plugin for your editor: http://editorconfig.org/#download | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e -x | |
pushd "$(git rev-parse --show-toplevel)" | |
# remove empty directories | |
find . \( -name "*.~?~" -or -name "*.pyc" -or -name "*.pyo" -or -name "*.orig" -or -name "*.rej" \) -delete | |
find . -not -path './.git/*' -a -type d -empty -delete | |
# remove po for removed modules | |
for D in addons openerp/addons odoo/addons .; do |
OlderNewer