Skip to content

Instantly share code, notes, and snippets.

View amerlyq's full-sized avatar

Dmytro Kolomoiets amerlyq

View GitHub Profile
@amerlyq
amerlyq / jrun-table.ijs
Last active December 2, 2019 18:46
Awk-like table data processing in J (jsoftware)
#!/bin/sh
#0 :0
trap '' PIPE
exec /usr/lib/j8/bin/jconsole "$0" "$@"
# vim:ft=j
)
NB.SUMMARY: awk-like table data processing
NB.USAGE: $ ./$0 [-b 'beg-exprs'..] [-e 'end-exprs'..] ['line-exprs'...]
NB. TODO: gather all files (and stdin by '-') into single list of boxes with data
@amerlyq
amerlyq / muttdebug.log
Last active September 18, 2017 16:32
mutt retry connection
[2017-09-18 12:40:58] Connecting to localhost...
[2017-09-18 12:40:58] Connection failed. errno: 111...
[2017-09-18 12:40:58] Connected to localhost:1143 on fd=4
[2017-09-18 12:40:58] imap_cmd_step: grew buffer to 512 bytes
[2017-09-18 12:40:58] 4< * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN IDLE MOVE] IMAP4rev1 DavMail 4.8.0-2479 server ready
[2017-09-18 12:40:58] Handling CAPABILITY
[2017-09-18 12:40:58] IMAP queue drained
### Repeated 3 times
[2017-09-18 12:40:58] imap_authenticate: Trying method login
# SEE: https://docs.python.org/3/reference/datamodel.html#special-method-lookup
class A(object):
pass
class B(object):
def __init__(self): self.a=A()
def __getattr__(self, n): print(n)
b = B()
print(b.__iter__)
0x772b8330 <mincore+0>: 3c 1c 00 07 lui gp,0x7
0x772b8334 <mincore+4>: 27 9c b1 40 addiu gp,gp,-20160
0x772b8338 <mincore+8>: 03 99 e0 21 addu gp,gp,t9
0x772b833c <mincore+12>: 24 02 10 79 li v0,4217
0x772b8340 <mincore+16>: 00 00 00 0c syscall
0x772b8344 <mincore+20>: 10 e0 00 07 beqz a3,0x772b8364 <mincore+52>
0x772b8348 <mincore+24>: 00 00 00 00 nop
0x772b834c <mincore+28>: 7c 03 e8 3b 0x7c03e83b
0x772b8350 <mincore+32>: 00 60 20 21 move a0,v1
0x772b8354 <mincore+36>: 8f 83 8a 24 lw v1,-30172(gp)
@amerlyq
amerlyq / vimrc_ag.vim
Created December 21, 2015 15:03
vimrc template for ag.vim issues
set nocompatible
set encoding=utf-8
let $NEOBUNDLE=expand('/tmp/bundle/neobundle.vim')
if !filereadable(expand('$NEOBUNDLE/README.md'))
exe printf('!git clone --depth=1 %s',
\ 'https://github.com/Shougo/neobundle.vim') $NEOBUNDLE
endif
set runtimepath^=$NEOBUNDLE