Skip to content

Instantly share code, notes, and snippets.

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Bundle 'jistr/vim-nerdtree-tabs'
Plugin 'tpope/vim-surround'
@Altreus
Altreus / gist:4c8e20bb43b9b37f131f
Created October 28, 2014 12:43
The best thing about python is how it forces you to write readable code
return reduce(lambda x,y: x+y, [ l.product_id.categ_id.name <> 'Margin' and l.price_subtotal or (l.price_unit * (l.product_uos and l.product_uos_qty or l.product_uom_qty)) for l in o.order_line ]) - (reduce(lambda x,y: x+y, [ reduce(lambda x, o: x + o.price_subtotal, i.invoice_line, 0) for i in o.invoice_ids if i.name and i.comment == 'PX' and i.state != 'cancel']) if [i for i in o.invoice_ids if i.name and i.comment == 'PX' and i.state != 'cancel'] else 0)
Exception with no information (raise GeneratorExit('Skip')):
<para style="terp_default_Centre_9">
[[
line.product_id.categ_id.name == 'Margin' and removeParentNode('para')
]][[
', '.join(map(lambda x: x.name, line.tax_id))
]]
</para>
0503.84�5�;�n�@������C@=
ףp�d@�� ��n�@V-�C@)\���dq@�!�u�n�@t��˶C@�(\��ES@����n�@^K�=�C@�(\�•f@�S3122601964988GF:10CCN X AccgS0@ @1F03� Y AccgS0@ @1F04�
Z AccgS0@ @1F05�C,
001 H2OStarlan�Bt�B��B��B2pB�HB8HB8 B��A Az
002 LAMBDADef A00Ax8A�HA�XA�fffA)��qA
xAX33�A��A@RPMRPMN1D01GPS
N1G01Lap TimesecN1F01Gear
elasticsearch:
image: elasticsearch
links:
- logstash
- kibana
logstash:
image: logstash
links:
- elasticsearch
- kibana
var press_button = curry(function(button, event) {
if (event.which == 13) {
event.preventDefault();
$(button).click();
}
});
$('input[name=cats]').keypress(press_button('button[name=lookup_cat]'));
@Altreus
Altreus / installation-order
Last active August 29, 2015 14:21
Get installation order of interdependent module list
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Capture::Tiny qw(capture_stdout);
use List::MoreUtils qw(uniq);
sub prereqs;
my %modules;
<script type="text/javascript">
[% footer_js %]
PF.Admin.M.activate();
PF.Admin.M.init(cfg);
</script>
#!/usr/bin/env perl
use strict;
use warnings;
use 5.014;
my $letters = lc sort_letters(shift);
my $dict = shift // '/usr/share/dict/words';
@Altreus
Altreus / gist:a2fbc52591181936797e
Created September 7, 2015 17:49
Tampermonkey for ultimate guitar tabs
// ==UserScript==
// @name Ultimate Guitar cleanup
// @version 0.1
// @match http://tabs.ultimate-guitar.com/*
// ==/UserScript==
(function() {
var tab = document.getElementById('cont');
var body = document.body;
while (body.hasChildNodes()) {