Skip to content

Instantly share code, notes, and snippets.

View raek's full-sized avatar

Rasmus Bondesson raek

View GitHub Profile
import weechat as w
morse = {
"0" : "-----",
"1" : ".----",
"2" : "..---",
"3" : "...--",
"4" : "....-",
"5" : ".....",
import collections
import re
import sys
ends = collections.Counter()
paths = collections.Counter()
def clean(path):
parts = path.split(",")
@raek
raek / example.rst
Created September 9, 2022 19:22
Sphinx extension for embedding a Youtube video player

Here is a video I like:

I2Q35uFCq8Q

Neat, huh?

---
- name: Install Pladder
hosts: all
tasks:
- name: Install system dependencies
become: yes
apt:
pkg:
- build-essential
- pkg-config
position: 39 of 3683 (1%), column: 0
character: i (displayed as i) (codepoint 105, #o151, #x69) charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x69 script: latin syntax: w which means: word
category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 69" or "C-x 8 RET LATIN SMALL LETTER I"
@raek
raek / demo_blinky.avr.s
Created August 1, 2021 21:56
Mysterious inverter
demo_blinky.avr.elf: file format elf32-avr
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 56 00 jmp 0xac ; 0xac <__ctors_end>
4: 0c 94 60 00 jmp 0xc0 ; 0xc0 <__bad_interrupt>
8: 0c 94 60 00 jmp 0xc0 ; 0xc0 <__bad_interrupt>
raek@mizar:~/src/cffi$ source .venv/bin/activate
(.venv) raek@mizar:~/src/cffi$ hg --verbose push --new-branch -r doc-improvements
pushing to ssh://hg@foss.heptapod.net/pypy/cffi
Enter passphrase for key '/home/raek/.ssh/id_rsa':
searching for changes
5 changesets found
uncompressed size of bundle content:
2277 (changelog)
1441 (manifests)
405 doc/source/cdef.rst
raek@mizar:~/src/cffi$ hg --verbose push --new-branch -r doc-improvements
pushing to ssh://hg@foss.heptapod.net/pypy/cffi
Enter passphrase for key '/home/raek/.ssh/id_rsa':
searching for changes
5 changesets found
uncompressed size of bundle content:
2277 (changelog)
1441 (manifests)
405 doc/source/cdef.rst
144 doc/source/index.rst
sudoedit /etc/apt/apt.conf.d/50unattended-upgrades
Aktivera följande rader (ta bort "//")
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::InstallOnShutdown "false";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-New-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Dependencies "false";
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Aktivera och ändra följande rader (ta bort "//" och ändra inställningen)