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
function simulateBarcodeScan(barcode) { | |
function simulateKeycode(keycode) { | |
return $('body').trigger($.Event('keypress', {which: keycode, keyCode: keycode})); | |
} | |
for (var i = 0; i < barcode.length; i++) { | |
simulateKeycode(barcode.charCodeAt(i)); | |
} | |
simulateKeycode(13); // Enter |
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 python2 | |
# -*- coding: utf-8 -*- | |
import sys | |
from argparse import ArgumentParser | |
parser = ArgumentParser(description="Recompute parent_left, parent_right") | |
parser.add_argument('odoo_basedir') | |
parser.add_argument('odoo_cfg') | |
parser.add_argument('odoo_db') | |
parser.add_argument('model', help='Odoo model, e.g. account.account') |
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 | |
if [ ! $# -gt 2 ]; then | |
echo "Usage: ./git_combine.sh new_repo_folder repo_folder repo_folder ..." | |
exit | |
fi | |
if [ ! -d $1 ]; then | |
mkdir $1 | |
fi |