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
const std = @import("std"); | |
const system = switch (std.builtin.os.tag) { | |
.linux => std.os.linux, | |
else => std.os.system, | |
}; | |
const ThreadPool = @This(); | |
max_threads: u16, | |
counter: u32 = 0, |
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
luarocks (3.1.3-1) unstable; urgency=medium | |
* New upstream release | |
-- Daurnimator <[email protected]> Fri, 07 Jun 2019 15:00:00 +1000 | |
luarocks (2.4.2+dfsg-1) unstable; urgency=medium | |
* New upstream release | |
* Support lua 5.1, 5.2 and 5.3 via lua-any |
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
#include <stdio.h> | |
#define SQ(x) (x)*(x) | |
#define M0(x,y) SQ(x)+SQ(y)<4?0:0xe0 | |
#define M1(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M0(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0)):0xc0 | |
#define M2(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M1(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0xa0 | |
#define M3(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M2(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x80 | |
#define M4(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M3(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x60 | |
#define M5(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M4(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x40 |
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 python | |
# pylint: disable-all | |
# Search LDAP for all People of hashbang.sh | |
import json | |
import sys | |
import ldap | |
import ldap.resiter | |
import psycopg2 |
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
from jinja2.runtime import Undefined | |
SPECIAL_DELIM = [("[{}[".format("="*n), "]{}]".format("="*n)) for n in range(10)] | |
def type_of(v, *types): | |
return any(isinstance(v, t) for t in types) | |
def get_delim(s): | |
if '"' not in s and "\n" not in s and "\\" not in s: | |
return ('"', '"') |
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 get_ping() | |
return p.find_first_file { | |
"/bin/ping" ; | |
"/sbin/ping" ; | |
} | |
end |
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
import binascii | |
import sys | |
emoji = ['🐧', '💩', '☠', '🍗', '🍔', '🐘', '🍍', '🐀', '👾', '💻'] | |
def silly_description_checksum(desc): | |
cs_in = '%d' % (binascii.crc32(desc) & 0xFFFFFFFF) | |
cs_out = [] | |
for c in cs_in: |
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
-- Generalized Partial Application Implementation In Lua | |
-- Azer Koculu <[email protected]> | |
-- Mon May 24 10:33:40 UTC 2010 | |
local function partial(fn,initialargs) | |
return function(...) | |
args = {} | |
if initialargs then table.foreach(initialargs,function(ind,el) table.insert(args,el) end) end | |
for i=0,arg['n'],1 do table.insert(args,arg[i]) end | |
return fn(unpack(args)) | |
end |
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
-- Generalized Partial Application Implementation In Lua | |
-- Azer Koculu <[email protected]> | |
-- Mon May 24 10:33:40 UTC 2010 | |
local function partial(fn,initialargs) | |
return function(...) | |
args = {} | |
if initialargs then table.foreach(initialargs,function(ind,el) table.insert(args,el) end) end | |
for i=0,arg['n'],1 do table.insert(args,arg[i]) end | |
return fn(unpack(args)) | |
end |