Skip to content

Instantly share code, notes, and snippets.

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]'));
elasticsearch:
image: elasticsearch
links:
- logstash
- kibana
logstash:
image: logstash
links:
- elasticsearch
- kibana
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
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>
@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)
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'
FROM perl
MAINTAINER Altreus <[email protected]>
RUN cpanm MooseX::Role::WithOverloading
$breakpoint: 992px;
@mixin small-screen {
@media (max-width: $breakpoint - 1) {
@content;
}
}
@mixin big-screen {
@media (min-width: $breakpoint) {
server {
listen 80;
server_name altre.us *.altre.us;
if ($uri = "/wildbill") {
return 301 http://shadow.cat/blog/matt-s-trout/the-wild-bill-protocol/;
}
if ($uri = "/blog") {
return 301 http://altreus.blogspot.com/;
}
$breakpoint: 992px;
@mixin small-screen {
@media (max-width: $breakpoint - 1) {
@content;
}
}
@mixin big-screen {