This is incomplete; please consider contributing to the documentation effort.
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 asyncio | |
import collections | |
from collections.abc import AsyncGenerator | |
class Subject(AsyncGenerator): | |
def __init__(self, *, loop=None): | |
if loop is None: | |
self._loop = asyncio.get_event_loop() | |
else: |
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
;; -*- lexical-binding:t -*- | |
(setq gc-cons-threshold 64000000 | |
gc-cons-percentage 0.6) | |
(add-hook 'after-init-hook | |
'(lambda () (setq gc-cons-threshold 800000 | |
gc-cons-percentage 0.1))) | |
(defalias 'yes-or-no-p 'y-or-n-p) | |
(add-to-list 'default-frame-alist '(font . "Fira Code 10")) |
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
def wrapper(iterable): | |
print("start") | |
results = yield from iterable | |
print("stop") | |
results[:] = [1, 1, 1] | |
return results | |
def multicall(*callables): | |
all_results = [] |
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 asyncio | |
async def poopyface(value): | |
if value == 3: | |
raise RuntimeError('Bail') | |
print(value) | |
def runall(*awaitables, loop=None): |
I hereby claim:
- I am vodik on github.
- I am vodik (https://keybase.io/vodik) on keybase.
- I have a public key ASBBbGRp-Z_d3DVdU6SbSMX0oY0CYCKD7i_zdKlJpGGz9go
To claim this, I am signing this object:
This is my opinionated approach to managing foreign packages in Arch Linux. In my humble opinion,
- Manually review PKGBUILDs from the internet to vet for correctness.
- Build in a clean chroot to ensure dependancies are correct.
- Make it easy to build stuff when dependancies are also foriegn.
- Easily share packages across multiple machines
- Cross compile to support i686 as well.
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
#!/bin/bash | |
videos=(http://vimeo.com/93039571 | |
http://vimeo.com/26149143 | |
http://vimeo.com/26149014 | |
http://vimeo.com/25861552 | |
http://vimeo.com/26148917 | |
http://vimeo.com/26113014 | |
http://vimeo.com/26048972 | |
http://vimeo.com/26112742) |
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
CFLAGS := -std=c11 \ | |
-Wall -Wextra -pedantic \ | |
-Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes \ | |
-D_GNU_SOURCE \ | |
$(CFLAGS) | |
LDLIBS = -lpcap -ljansson | |
all: esl_pcap_trace |
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
def next_free_port(host, family, proto): | |
for res in socket.getaddrinfo(host, '0', family, proto): | |
(family, socktype, proto, _, sockaddr) = res | |
with socket.socket(family, socktype) as sock: | |
sock.bind((sockaddr[0], 0)) | |
return sock.getsockname()[:2] | |
print(next_free_port('vodik', socket.AF_INET, socket.SOCK_STREAM)) | |
print(next_free_port('vodik', socket.AF_INET, socket.SOCK_DGRAM)) |
NewerOlder