Skip to content

Instantly share code, notes, and snippets.

View norcalli's full-sized avatar

Ashkan Kiani norcalli

View GitHub Profile
require'nvim_lsp/skeleton'.julials = {
default_config = {
cmd = {'julia', '--startup-file=no', '--history-file=no', '-e', [[
using Pkg;
using LanguageServer;
import StaticLint;
import SymbolServer;
env_path = dirname(Pkg.Types.Context().env.project_file);
debug = false;
#!/usr/bin/env fennel
(macros {
:append (fn [t v]
`(let [t# ,t] (rawset t# (+ (length t#) 1) ,v)))
; TODO(ashkan): this results in an error when you try
; to do (tset? (tset? {} :a 123) :b 321)
; :tset? (fn [t k v]
; `(let [t# ,t k# ,k]
local function open_floating_terminal(command)
local uis = vim.api.nvim_list_uis()
local opts = {
relative = 'editor';
width = math.floor(uis[1].width * 50 / 100);
height = math.floor(uis[1].height * 50 / 100);
anchor = 'NW';
style = 'minimal';
focusable = false;
}
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))]
#!/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
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()

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
~/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.
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;
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;