Skip to content

Instantly share code, notes, and snippets.

View norcalli's full-sized avatar

Ashkan Kiani norcalli

View GitHub Profile
#!/usr/bin/env bash
p() {
echo "$@" >&2
}
test -z "$USERNAME" && USERNAME=$1
test -z "$USERNAME" && {
p "Usage: $0 <github_username>"
// runc clang: -g -shared -fPIC -maes -mssse3
#include "/k/runc/include/sqlite-amalgamation-3360000//sqlite3ext.h"
SQLITE_EXTENSION_INIT1
#include "/k/runc/include/ak/ak_types.h"
#include "/k/runc/include/meow_hash/meow_hash_x64_aesni.h"
#include <assert.h>
static void
sq_meowhash(
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `sway --my-next-gpu-wont-be-nvidia'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005608b012bc24 in transaction_apply (transaction=0x5608b340c140) at ../sway/desktop/transaction.c:296
296 struct sway_node *node = instruction->node;
[Current thread is 1 (Thread 0x7f696d80c940 (LWP 1006723))]
(gdb) #0 0x00005608b012bc24 in transaction_apply (transaction=0x5608b340c140) at ../sway/desktop/transaction.c:296
instruction = 0x0
node = 0x5608b2f942d0
use std::io::{stdin, Read};
fn main() {
let mut stdin = stdin();
let mut buf = [0u8; 7 + 3 + 1];
let mut max_id = 0;
let mut min_id = 1 << buf.len();
let mut sum = 0;
while let Ok(()) = stdin.read_exact(&mut buf) {
let mut row = 0;
use std::io::{stdin, Read};
fn main() {
let mut stdin = stdin();
let mut buf = [0u8; 7 + 3 + 1];
let mut max_id = 0;
while let Ok(()) = stdin.read_exact(&mut buf) {
let mut row = 0;
let mut col = 0;
~/works/3rd/wl-clipboard master 585ms
❯ gdb -args wl-paste
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.

v4l2 plugin installation

Here's some notes for using the v4l2loopback with linux:

  • As a prerequisite, you need to install v4l2loopback https://github.com/umlaeute/v4l2loopback . For Arch users, there's v4l2loopback-dkms in community (not even AUR). I would check apt/whatever you're using first if it's available.
  • For the installation of the plugin itself (https://github.com/CatxFish/obs-v4l2sink), I used the AUR package obs-v4l2sink, so I can't really help much with that. The non -git version worked fine for me if you're also on Arch.
  • After installation, you'll need to actually create a v4l2loopback device. More details are described here https://github.com/umlaeute/v4l2loopback#run , but the gist is to run sudo modprobe v4l2loopback video_nr=5 exclusive_caps=1. The video_nr=5 tells it to create /dev/video5. You may not need exclusive caps, but I personally did for Chrome/FF to work properly. NOTE: You are loading a kernel module, which you can only do once, so if you want to change a setting
local snippets = require'snippets'
local U = require'snippets.utils'
local C = require'snippets.common'
local format = string.format
local insert = table.insert
local concat = table.concat
function time_delayed(count)
vim.schedule(function()
#!/usr/bin/env fish
set CORE_FILE (newest-file.c core.nvim.\*)
set NVIM_BINARY (which nvim)
function make_report
uname -srvm
echo
nvim --version
echo
printf "%s\n" "bt full" (printf "frame %d\n" (seq 20)) | gdb --core=$CORE_FILE $NVIM_BINARY 2>&1
Reading symbols from /usr/bin/nvim...done.
[New LWP 1122]
[New LWP 1111]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nvim'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7efd585a8700 (LWP 1122))]