Skip to content

Instantly share code, notes, and snippets.

View ArchKudo's full-sized avatar
🎍
Grooving

ArchKudo ArchKudo

🎍
Grooving
View GitHub Profile
rm -rf _build/*
sphinx-build -b latex -d _build/doctrees . _build/latex
Running Sphinx v5.3.0
making output directory... done
myst v0.18.1: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['colon_fence', 'deflist', 'dollarmath'], disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=3, heading_slug_func=None, footnote_transition=True, words_per_minute=200, sub_delimiters=('{', '}'), linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area')
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: [new config] 65 added, 0 changed, 0 removed
reading sources... [100%] wave
looking for now-outdated files... none found
@ArchKudo
ArchKudo / aw-qt-log.md
Last active October 7, 2018 08:54
Activity Watch Journalctl Log
~cd .local/activitywatch/

~/.local/activitywatch
❯ ./aw-qt
2018-10-07 13:41:37 [INFO ]: Starting module aw-server  (aw_qt.manager:46)
2018-10-07 13:41:37 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:46)
2018-10-07 13:41:37 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:46)
@ArchKudo
ArchKudo / errno.py
Created May 21, 2018 13:44
Errno for Ouroboros
"""This module makes available standard errno system symbols.
The value of each symbol is the corresponding integer value,
e.g., on most systems, errno.ENOENT equals the integer 2.
The dictionary errno.errorcode maps numeric codes to symbol names,
e.g., errno.errorcode[2] could be the string 'ENOENT'.
Symbols that are not relevant to the underlying system are not defined.
@ArchKudo
ArchKudo / app.py
Last active March 9, 2018 15:38
Toga Font
import toga
from toga.constants import MONOSPACE, SMALL_CAPS
from toga.style import Pack
def build(app):
box = toga.Box()
label = toga.Label('Hello world', style=Pack(font_variant=SMALL_CAPS)) # Replacing with font_family=monospace or font_size=20 works
label.style.padding = 100
label.style.flex = 1
from functools import reduce
import operator
mat = [[11, 2, 4], [4, 5, 6], [10, 8, -12]]
def diff_sum(a, b):
return abs(sum(a) - sum(b))
@ArchKudo
ArchKudo / journalctl.txt
Created July 6, 2017 07:33
journalctl -b > journalctl.txt
-- Logs begin at Sat 2017-04-08 15:33:49 IST, end at Thu 2017-07-06 11:56:15 IST. --
Jul 06 11:45:51 localhost kernel: Linux version 4.11.7-1-ARCH (builduser@tobias) (gcc version 7.1.1 20170621 (GCC) ) #1 SMP PREEMPT Sat Jun 24 09:07:09 CEST 2017
Jul 06 11:45:51 localhost kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/encrypt-root rw rd.luks.uuid=fb2a1e44-3624-4520-b8f8-f4fd9f3f2511 quiet
Jul 06 11:45:51 localhost kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Jul 06 11:45:51 localhost kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Jul 06 11:45:51 localhost kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Jul 06 11:45:51 localhost kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
Jul 06 11:45:51 localhost kernel: x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
Jul 06 11:45:51 localhost kernel: e820: BIOS-provided physical RAM map:
Jul 06 11:45:51 localhost kernel: BIOS-e8
Jan 14 14:13:25 hbar gnome-session-binary[858]: Unrecoverable failure in required component org.gnome.Shell.desktop
Jan 14 14:14:07 hbar gnome-session-binary[3415]: Unrecoverable failure in required component org.gnome.Shell.desktop
Jan 14 14:14:08 hbar systemd-coredump[3587]: Process 3431 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 3431:
#0 0x00007fde99e1604f raise (libc.so.6)
#1 0x00007fde99e1747a abort (libc.so.6)
#2 0x00007fde9a40f2a5 g_assertion_message (libglib-2.0.so.0)
#3 0x00007fde9a40f33a g_assertion_message_expr (libglib-2.0.so.0)
#4 0x00007fde9b3fb1d3 gtk_icon_info_load_icon_finish (libgtk-3.so.0)
@ArchKudo
ArchKudo / gist:c482737470ccff6e35f0e5c7241223ff
Created January 14, 2017 04:24
Gnome Shell Stack Trace
Jan 14 09:49:51 hbar systemd-coredump[7604]: Process 7450 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 7450:
#0 0x00007f2de1b7f04f raise (libc.so.6)
#1 0x00007f2de1b8047a abort (libc.so.6)
#2 0x00007f2de21782a5 g_assertion_message (libglib-2.0.so.0)
#3 0x00007f2de217833a g_assertion_message_expr (libglib-2.0.so.0)
#4 0x00007f2de31641d3 gtk_icon_info_load_icon_finish (libgtk-3.so.0)
#5 0x00007f2de3164258 n/a (libgtk-3.so.0)
#6 0x00007f2de26f6323 n/a (libgio-2.0.so.0)
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
int **allocate_matrix(int rows, int cols) {
// Setup Rows
int **matrix = calloc(rows, sizeof(matrix));
// Setup Corresponding Columns
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 2.7.1.0 on Thu Jan 1 00:00:23 1970
I:Internal path defined: '/data/media/0'
I:External path defined: '/external_sd'
I:Mount: Unable to find partition for path '/data'
RECOVERY_SDCARD_ON_DATA := true
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
TW_HAS_DOWNLOAD_MODE := true