Skip to content

Instantly share code, notes, and snippets.

View soyayaos's full-sized avatar

Vladimir Galunshchikov soyayaos

View GitHub Profile
@andrewrk
andrewrk / strace_c.txt
Last active November 22, 2023 17:47
overhead of hello world in C, C++, Zig
andy@ark ~/tmp> gcc -o hello hello.c
andy@ark ~/tmp> strace ./hello
execve("./hello", ["./hello"], 0x7ffe96b5ddb0 /* 62 vars */) = 0
brk(NULL) = 0x2129000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/tls/haswell/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/tls/haswell/x86_64", 0x7fff2bd55cc0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/tls/haswell/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/tls/haswell", 0x7fff2bd55cc0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or dire
@linuxkathirvel
linuxkathirvel / print-scr-key-to-flameshot-tool-in-gnome3.md
Last active August 21, 2024 14:09
How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

  1. Goto Keyboard settings and click 'Save a screenshot to Pictures' under 'Screenshots' section.
  2. Press 'Backspace' key delete 'PrtScr' key shortcut and press 'Set' button
  3. Press '+'(Plust) icon in the 'Custom Shortcuts' in the same window
  4. Enter 'Flameshot' in 'Name' field , 'flameshot gui' in 'Command' field, and click 'Set Shortcut' button and press 'PrtScr' button in the keyboard and close the dialog box 5.That's it. If you press 'PrtScr' key, the Flameshot selection area screen will appear.
@nitrag
nitrag / convert_m4b.sh
Last active September 17, 2024 05:31
Audibook convert m4b to mp3. This will split into chaptered mp3 files and automatically reconfigure proper ID3v2 tags.
#!/bin/bash
#
# sudo apt-get install id3v2 ffmpeg
#
# USAGE:
# cd /book title/
# bash ~/this_script_path.sh
# rm *.m4b (you need to manually remove the original in case something goes wrong)
#
#