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] xdg_surface@24.configure(7657)
[2469486,536] -> xdg_surface@24.ack_configure(7657)
[2469486,541] wl_callback@11999.done(76940376)
[2469486,616] wl_display@1.delete_id(11850)
...repeats 170 times...
[2469487,153] wl_display@1.delete_id(11680)
[2469489,057] wl_buffer@879.release()
[2469489,078] wl_callback@31.done(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] -> wl_display@1.get_registry(new id wl_registry@2)
[3466459.871] -> wl_display@1.sync(new id wl_callback@3)
[3466460.006] wl_display@1.delete_id(3)
[3466460.033] wl_registry@2.global(1, "wl_shm", 1)
[3466460.054] -> wl_registry@2.bind(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 })