Skip to content

Instantly share code, notes, and snippets.

#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <vector>
extern "C" {
typedef struct EventDesc_ {
size_t len;
char prefix;
@shrkamat
shrkamat / lite-xl-build-failure.sh
Last active March 31, 2023 19:26
lite-xl build failure for wasm target
This file has been truncated, but you can view the full file.
The Meson build system
Version: 1.0.1
Source dir: /home/skamath/Projects/lite-xl
Build dir: /home/skamath/Projects/lite-xl/build-linux-x86_64
Build type: cross build
Project name: lite-xl
Project version: 2.1.1
C compiler for the host machine: emcc (emscripten 3.1.34 "emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.34 (57b21b8fdcbe3ebb523178b79465254668eab408)")
C linker for the host machine: emcc ld.wasm 17.0.0
C compiler for the build machine: ccache cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
@shrkamat
shrkamat / setup.yml
Created October 14, 2022 17:45
Try ansible on Ubuntu
- hosts: localhost
become: true
tasks:
- name: Install generic packages
apt: name={{items}}
with_items:
- htop
- tmux
@shrkamat
shrkamat / observer.cpp
Last active March 4, 2022 09:49
observer/ listener based on weak_ptr
#include <iostream>
#include <list>
#include <memory>
#include <string>
struct Config {
std::string clientId;
};
class ConfigListener {
./build.sh
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make distclean
make[1]: Entering directory '/home/skamath/Projects/vim.wasm/src'
cd testdir; make -f Makefile clean
make[2]: Entering directory '/home/skamath/Projects/vim.wasm/src/testdir'
rm -rf *.out *.failed *.res *.rej *.orig XfakeHOME Xdir1 Xfind
rm -f opt_test.vim test.log test_result.log messages
rm -f test.out X* viminfo tiny.vim small.vim mbyte.vim mzscheme.vim test.ok benchmark.out
@shrkamat
shrkamat / qt-5.5-qeglplatformintegration-X.patch
Created September 30, 2021 09:51
Fixes of Qt 5.5 compilation errors
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
index 42fbf8c8a1..e4bb58ebec 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
@@ -50,6 +50,14 @@
#include <qpa/qplatformnativeinterface.h>
#include <EGL/egl.h>
+#ifdef None
+#undef None
@shrkamat
shrkamat / qt-5.4-qeglplatformintegration-Redefine-CursorShape-from-X.patch
Created September 17, 2021 09:43
Qt 5.4 / 5.6 build failure on Ubuntu 20.04
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
index 2b5d5f50fb..49b3ad151b 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h
@@ -50,6 +50,10 @@
#include <qpa/qplatformnativeinterface.h>
#include <EGL/egl.h>
+#ifdef CursorShape
+#undef CursorShape
@shrkamat
shrkamat / epbf-kprobe-fail
Created March 25, 2021 22:16
strace for ebpf-kprobe
execve("./ebpf-kprobe", ["./ebpf-kprobe"], 0x7ffc5b9788 /* 6 vars */) = 0
sched_getaffinity(0, 8192, [0, 1, 2, 3]) = 8
openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = -1 ENOENT (No such file or directory)
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8c309000
mmap(0x4000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000000000
mmap(0x4000000000, 67108864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4000000000
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a309000
mmap(NULL, 2164736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a0f8000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a0e8000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a0d8000
@shrkamat
shrkamat / SuryaNamaskara.xml
Last active March 7, 2021 15:18
Suryanamaskara with polly
<speak>
<p>Starting first half for round 1</p>
<break time="2s"/>
<p>Prayer pose</p>
<break time="3s"/>
<p>Raised arms pose</p>
<break time="2.5s"/>
<p>Hand to foot pose</p>
<break time="2.8s"/>
@shrkamat
shrkamat / gammaray-2.10
Last active November 12, 2020 13:47
Gammaray build failure
-- The CXX compiler identification is GNU 6.3.0
-- The C compiler identification is GNU 6.3.0
-- Check for working CXX compiler: /auto/data/Published/code/compilers/stbgcc-6.3-1.7-kaon/bin/aarch64-linux-g++
-- Check for working CXX compiler: /auto/data/Published/code/compilers/stbgcc-6.3-1.7-kaon/bin/aarch64-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /auto/data/Published/code/compilers/stbgcc-6.3-1.7-kaon/bin/aarch64-linux-gcc
-- Check for working C compiler: /auto/data/Published/code/compilers/stbgcc-6.3-1.7-kaon/bin/aarch64-linux-gcc -- works