Skip to content

Instantly share code, notes, and snippets.

@Anachron
Anachron / pkgs.txt
Created March 27, 2019 19:56
python pkgs
[*] python-2.7.16_1 Interpreted, interactive, object-oriented programming language
[*] python-pip-18.1_1 The PyPA recommended tool for installing PyPI packages (Python2)
[*] python-setuptools-40.6.3_2 Easily build and distribute Python2 packages
[*] python3-3.6.8_3 Interpreted, interactive, object-oriented programming language (3.6 series)
[*] python3-Pillow-5.4.1_1 Python Imaging Library (PIL) fork (Python3)
[*] python3-PyOpenGL-3.1.0_3 Standard OpenGL bindings for Python3
[*] python3-Unidecode-1.0.23_1 Python3 ASCII transliterations of Unicode text
[*] python3-atomicwrites-1.3.0_1 Simple Python3 API for atomic file writes
[*] python3-cairo-1.18.0_2 Python3 bindings for the cairo graphics library
[*] python3-chardet-3.0.4_2 Universal encoding detector for Python 2 and 3 (Python3)
@Anachron
Anachron / desktops.bash
Created March 9, 2019 19:36
Get all visible desktops and print them in one line
xdotool search --onlyvisible '' get_desktop_for_window %@ 2>/dev/null | sort | uniq | grep -v '^-' | tr '\n' ' '
@Anachron
Anachron / active.csv
Last active March 2, 2019 19:50
irc setup
server channel
%%
% German Latex Letter Template
% Use if you want to crate a Letter in DIN A4. You can use it in English and German
% as well, just set language at begining of plain text.
% Created by Jan Boelmann @ Nov. 2016 [email protected]
%%
\documentclass[
sender,
paper=a4,
@Anachron
Anachron / pkg-installs
Last active February 8, 2019 08:13
/usr/lib/lib issue
# ls -lisa /usr/lib/lib
402148 0 lrwxrwxrwx 1 root root 3 17. Jan 09:51 /usr/lib/lib -> lib
# xilog | grep '2019-01-17'
base-files-0.139_12 : 2019-01-17 09:51 CET
dracut-048_4 : 2019-01-17 09:51 CET
pam-base-0.3_4 : 2019-01-17 09:51 CET
shadow-4.6_2 : 2019-01-17 09:51 CET
---
libXdamage-32bit-1.1.4_6 : 2019-01-17 10:03 CET
@Anachron
Anachron / xbuilders
Last active February 10, 2019 14:26
xbuilders: Print build status of xbps builders
#!/usr/bin/env sh
if test "$#" -eq 0 && test -z "${NOCOLOR}" && test -z "${XB_COLORIZE}"; then
export XB_COLORIZE=1
"${0}" \
| sed -e 's|\b\(0\)\b|\\033\[0\;2m\1\\033\[0m|g' \
| sed -e 's|\b\([1-9]\)\b|\\033\[0\;32m\1\\033\[0m|g' \
| sed -e 's|\b\([0-9]\{2\}\)\b|\\033\[0\;31m\1\\033\[0m|g' >/tmp/xbf
printf '%b\n' "$(cat /tmp/xbf)"
rm -f /tmp/xbf
@Anachron
Anachron / firefox-base16
Created January 17, 2019 15:40
Script to generate Firefox-Color themes on the fly using base0x
#!/usr/bin/env sh
# https://github.com/mozilla/FirefoxColor/blob/2b5cdf55754eaebcf29b367100964372b80d0a45/src/preset-themes/default.json
# https://github.com/mozilla/FirefoxColor/blob/2b5cdf55754eaebcf29b367100964372b80d0a45/src/web/index.js#L43-L51
# https://github.com/masotime/json-url/blob/master/src/main/index.js#L11-L23
# https://github.com/RGBboy/urlsafe-base64/blob/master/lib/urlsafe-base64.js#L31-L61
ffc_c() {
msgpack-cli encode | lzma -c | base64 | sed 's|+|-|g; s|/|_|g'
}
@Anachron
Anachron / pip-manual
Last active January 16, 2019 12:34
Find pip packages and check whether they are installed via xbps or manually
#!/usr/bin/env sh
pl=$(pip list | cut -d ' ' -f 1 | tail -n +3)
for p in ${pl}; do
w=$(which "${p}" 2>/dev/null)
test -z "${w}" && printf 'WARN: %s exe not found!\n' "${p}" && continue
xpkg=$(xbps-query -o "${w}")
test -n "${xpkg}" && printf '%s -> %s\n' "${p}" "${xpkg}" || printf '%s (manual)\n' "${p}"
done
@Anachron
Anachron / grub.txt
Created November 28, 2018 09:25
grub config
#
# Configuration file for GRUB.
#
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Void"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 slub_debug=P page_poison=1"
# Uncomment to use basic console
@Anachron
Anachron / error.txt
Created October 9, 2018 13:38
Latex Compile Error
~/usr/doc/prv/cv » rubber Awesome-CV/examples/resume.tex
compiling Awesome-CV/examples/resume.tex...
/opt/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec.sty:45: ..............................................
/opt/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec.sty:45: leading text: \msg_fatal:nn {fontspec} {cannot-use-pdftex}