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 aiohttp | |
import logging | |
async def fetchurl(session, url: str): | |
async with session.get(url) as response: | |
return len(await response.text()) | |
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 strip_lifespan_events(app): | |
""" | |
handlers/ignores lifespan events from being routed to the given app. | |
""" | |
async def _app(scope, receive, send): | |
if scope.get("type") == "lifespan": | |
payload = await receive() | |
await send({'type': payload['type'] + ".complete"}) | |
return | |
await app(scope, receive, send) |
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
(gdb) i thr | |
Id Target Id Frame | |
* 1 Thread 0x7f1781b0a0c0 (LWP 9315) "fish" 0x00007f1782122420 in free@plt () | |
from /nix/store/784rh7jrfhagbkydjfrv68h9x3g4gqmk-gcc-8.3.0-lib/lib/libstdc++.so.6 | |
2 Thread 0x7f17737fe700 (LWP 9392) "fish" 0x00007f1781cceee2 in pthread_cond_wait@@GLIBC_2.3.2 () | |
from /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libpthread.so.0 | |
3 Thread 0x7f1773fff700 (LWP 9401) "fish" 0x00007f1781cceee2 in pthread_cond_wait@@GLIBC_2.3.2 () | |
from /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libpthread.so.0 | |
4 Thread 0x7f1779806700 (LWP 9402) "fish" 0x00007f1781cceee2 in pthread_cond_wait@@GLIBC_2.3.2 () | |
from /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27/lib/libpthread.so.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
#!/usr/bin/env bash | |
echo "include('/etc/mock/templates/fedora-31.tpl') | |
config_opts['target_arch'] = 'x86_64' | |
config_opts['legal_host_arches'] = ('x86_64',) | |
config_opts['plugin_conf']['bind_mount_enable'] = True | |
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('$PWD/sway-tmp', '/d')) | |
" > swaymock.cfg |
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
gdb) i thr | |
Id Target Id Frame | |
* 1 Thread 0x7ffff539b080 (LWP 18338) "waybar" 0x00007ffff7123dc9 in pthread_mutex_lock () from /lib64/libpthread.so.0 | |
2 Thread 0x7fffe83ed700 (LWP 18346) "gmain" 0x00007ffff70435c7 in poll () from /lib64/libc.so.6 | |
3 Thread 0x7fffe7bec700 (LWP 18347) "pool-waybar" 0x00007ffff7048fad in syscall () from /lib64/libc.so.6 | |
4 Thread 0x7fffe73ad700 (LWP 18348) "gdbus" 0x00007ffff70435c7 in poll () from /lib64/libc.so.6 | |
5 Thread 0x7fffe6bac700 (LWP 18349) "dconf worker" 0x00007ffff70435c7 in poll () from /lib64/libc.so.6 | |
6 Thread 0x7fffe60ac700 (LWP 18354) "waybar" 0x00007ffff712a93d in __lll_lock_wait () from /lib64/libpthread.so.0 | |
7 Thread 0x7fffe58ab700 (LWP 18355) "waybar" 0x00007ffff712ae7c in recv () from /lib64/libpthread.so.0 | |
9 Thread 0x7fffe48a9700 (LWP 18359) "threaded-ml" 0x00007ffff70435c7 in poll () from /lib64/libc.so.6 |
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
> gdb ./build/sway/sway | |
(gdb) run -c config | |
... | |
Thread 2 "sway:disk$0" received signal SIG33, Real-time event 33. | |
(gdb) list handle_cursor_motion_absolute | |
264 e->unaccel_dx, e->unaccel_dy); | |
265 transaction_commit_dirty(); | |
266 } | |
267 | |
268 static void handle_cursor_motion_absolute( |
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
version: "2" | |
services: | |
consul: | |
build: ./consul/0.7/consul | |
image: gliderlabs/consul:0.7 | |
consul-agent: | |
build: ./consul/0.7/consul-agent | |
image: gliderlabs/consul-agent:0.7 | |
consul-server: | |
build: ./consul/0.7/consul-server |
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
with import <nixpkgs> {}; | |
let | |
# wrapBinary builds a new derivation that wraps the given package and binary file with makeWrapper, | |
# using the given params. Supports wrapping a binary without forcing a recompilation. | |
# * name - Package name | |
# * package - The package we are wrapping | |
# * binary - Binary the binary name within $package/bin/$binary |
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
with import <nixpkgs> {}; | |
let | |
webApp = { name, title, url }: stdenv.mkDerivation rec { | |
inherit name; | |
src = pkgs.writeText "src" '' | |
[Desktop Entry] | |
Version=1.0 | |
Terminal=false |
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
{ | |
wine = { | |
release = "staging"; # "stable", "unstable", "staging" | |
build = "wineWow"; # "wine32", "wine64", "wineWow" | |
pulseaudioSupport = true; | |
}; | |
packageOverrides = pkgs: { | |
wine = pkgs.stdenv.lib.overrideDerivation pkgs.wine (oldAttrs : { | |
wineBuild = "wineWow"; |
NewerOlder