Skip to content

Instantly share code, notes, and snippets.

View jkbbwr's full-sized avatar
💭
???

Jakob Bowyer jkbbwr

💭
???
View GitHub Profile
(ノ◕ヮ◕)ノ*:・ ゚ ゚✧
def tuplecpy(dst, src, begin_offset):
"""
Of course this function should NEVER be used in real code
It will probably result in segfaults/crashes
- copy tuple(src) to dst[begin_offset:] tuple
- remember id(x) -> addressof(x)
"""
OFFSET = ctypes.sizeof(ctypes.c_size_t) * 3
PTR_SIZE = ctypes.sizeof(ctypes.c_size_t)
dst_addr = id(dst) + OFFSET + PTR_SIZE * begin_offset
@jkbbwr
jkbbwr / ircbot.awk
Created August 8, 2016 11:52 — forked from ilmoeuro/ircbot.awk
AWK ircbot, usage with ncat is left as an exercise for the reader
function message(str) {
system("sleep 0.1");
printf("%s\r\n", str);
printf(">>> %s\n", str) > "/dev/stderr";
system("sleep 0.1");
}
{
printf("<<< %s", $0) > "/dev/stderr";
if (! initialized) {

Keybase proof

I hereby claim:

  • I am jkbbwr on github.
  • I am jkbbwr (https://keybase.io/jkbbwr) on keybase.
  • I have a public key ASDGuqwXbjyvbFK3i_LDpEHqHpG42Yl3XAeGLKrxh56hHgo

To claim this, I am signing this object: