Skip to content

Instantly share code, notes, and snippets.

View akvadrako's full-sized avatar
🥏
Frisbeeing

Devin Bayer akvadrako

🥏
Frisbeeing
View GitHub Profile
@akvadrako
akvadrako / filters_plugins.py
Created February 28, 2013 10:04
send a welcome message from ansible
import yaml
class FilterModule(object):
def filters(self):
return {
'nice_yaml': lambda *a, **kw: yaml.safe_dump(*a, indent=4, default_flow_style=False, **kw),
}
""""""""""""
""
"" Devin's VIM Settings
""
"""""""""""
" Options
set autoindent
set autowrite
[root@ip-10-11-12-73 ec2-user]# docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 1.11.2
Storage Driver: devicemapper
Pool Name: docker-docker--pool
Pool Blocksize: 524.3 kB
@akvadrako
akvadrako / better-nodejs-require-paths.md
Created February 2, 2018 16:39 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@akvadrako
akvadrako / kitty wayland log
Last active May 19, 2020 18:43
kitty crash
[2469486,529] [email protected](7657)
[2469486,536] -> [email protected]_configure(7657)
[2469486,541] [email protected](76940376)
[2469486,616] [email protected]_id(11850)
...repeats 170 times...
[2469487,153] [email protected]_id(11680)
[2469489,057] [email protected]()
[2469489,078] [email protected](7458)
@akvadrako
akvadrako / pty-demo.c
Last active March 5, 2024 06:47
Linux pseudo TTY example
/**
* gcc -o pty-demo pty-demo.c
* pty-demo bash
*/
#define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */
#include <fcntl.h>
#include <errno.h>
#include <stdio.h> /* for convenience */
random: Trying to read entropy from /dev/random
Configuration file: ./hostapd.conf
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
This file has been truncated, but you can view the full file.
(cog:174220): GLib-GIO-DEBUG: 13:41:14.893: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ?gio-vfs?
(cog:174220): Cog-DEBUG: 13:41:14.895: platform_setup: Platform name: fdo
(cog:174220): Cog-DEBUG: 13:41:14.895: platform_setup: Platform plugin: libcogplatform-fdo.so
(cog:174220): Cog-FDO-DEBUG: 13:41:14.896: Initializing Wayland...
[3466459.834] -> [email protected]_registry(new id wl_registry@2)
[3466459.871] -> [email protected](new id wl_callback@3)
[3466460.006] [email protected]_id(3)
[3466460.033] [email protected](1, "wl_shm", 1)
[3466460.054] -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
(cog:174220): Cog-FDO-DEBUG: 13:41:14.897: Using 'wl_shm' interface obtained from the Wayland registry.
const { chromium, firefox } = require('playwright');
async function demo() {
const type = chromium
const browser = await type.launch({ headless: false })
const ctx = await browser.newContext()
const page = await ctx.newPage()
ctx.tracing.start({ screenshots: true, snapshots: true })