Skip to content

Instantly share code, notes, and snippets.

@ArneBab
ArneBab / exwm-panel.el
Created January 30, 2024 11:17 — forked from TatriX/exwm-panel.el
Pure Elisp panel for EXWM
(defun my-setup-header-line-format ()
"Hide header line if required."
(set-window-parameter (next-window) 'header-line-format
(unless (window-at-side-p (next-window) 'top)
'none)))
(add-hook 'exwm-update-class-hook #'my-setup-header-line-format)
(set-face-attribute 'header-line nil
:background "#000000"
$ hg log -r "::onehandright - ::default" -p ../config.py
changeset: 1796:4ef5b7d999db
branch: onehandright
user: Arne Babenhauserheide <[email protected]>
date: Wed Apr 03 11:42:31 2019 +0200
summary: adjust config for a right-hand one-hand layout
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@ArneBab
ArneBab / 0-letterblock.js
Created April 13, 2021 00:09 — forked from atoponce/0-letterblock.js
Improve the password generator security of https://www.draketo.de/english/secure-passwords
/*
Improves the security of https://www.draketo.de/english/secure-passwords:
- Replace the letters with the original proposal at https://www.draketo.de/software/letterblock-diceware
- All bigrams are kept, rather than truncating
- Replace Math.random() with crypto.getRandomValues()
- Replace Math.floor(Math.random() * length) with uniform modulo rejection
- Replace a character count with a minimum security margin
- The HTML "Length" input should be replaced with "Security minimum" (or something similar, in bits)
- Implement the checksum per https://www.draketo.de/software/letterblock-diceware
- Use 6 characters instead of 4 (or 7) for a uniform checksum
gcc-toolchain 10.2.0 debug /gnu/store/88wcfjxsw2iz4im9bmmadcpd7cj4mln1-gcc-toolchain-10.2.0-debug
rust 1.45.2 cargo /gnu/store/rr9syjbf3d5sayn7pbwjd5f4w8jqfd5b-rust-1.45.2-cargo
openjdk 14.0 doc /gnu/store/k3gmakll67i4r5isxa3fn9az79pi2111-openjdk-14.0-doc
libaom 2.0.0 out /gnu/store/cjlw9f7xkw5g01wm2aannvmala0agnra-libaom-2.0.0
help2man 1.47.13 out /gnu/store/3yqbkwliaf32d6bdrfl2v6g0mp21lnlg-help2man-1.47.13
zlib 1.2.11 out /gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11
zip 3.0 out /gnu/store/sm5b6s7zlhwbawxw1vyqxmhggahkb5s0-zip-3.0
yasm 1.3.0 out /gnu/store/55m8w0mdqkmwxkn70h650fj0zlgmnhva-yasm-1.3.0
xkeyboard-config 2.29 out /gnu/store/m96xy2wyfrg18m638h411k925rg8cjm6-xkeyboard-config-2.29
xdg-user-dirs 0.17 out /gnu/store/yysps197lvn4ynzssjz24cklsijl5i1z-xdg-user-dirs-0.17
@ArneBab
ArneBab / hg-profile
Created August 26, 2020 13:02
profile of hg status in openjdk repository
~/Java/openjdk-upstream $ time HGWITHRUSTEXT=cpython ~/Downloads/hg-stable/hg --profile status
*** failed to import extension hggit: 'module' object has no attribute 'command'
| 100.0% 1.05s dispatch.py: _callcatch line 43: dispatch.run()
| 100.0% 1.05s scmutil.py: callcatch line 486: return scmutil.callcatch(ui...
| 100.0% 1.05s dispatch.py: _runcatchfunc line 152: return func()
| 100.0% 1.05s commands.py: status line 467: return _dispatch(req)
\ 89.5% 0.94s ui.py: pager line 6889: ui.pager(b'status')
\ 59.0% 0.62s ui.py: _runpager line 1357: if self._runpager(pagercmd,...
| 59.0% 0.62s subprocess.py: __init__ line 1415: env=procutil.tonativeenv(pr...
| 59.0% 0.62s subprocess.py: _execute_childline 394: errread, errwrite)
@ArneBab
ArneBab / geometric-slowdown.txt
Created November 8, 2018 23:30
Scheme benchmark geometric slowdown evaluation
Evaluation of the geometric slowdown in the data from https://ecraven.github.io/r7rs-benchmarks/
The first number is the geometric mean of the slowdown against the fastest implementation in each test. The first number in parens is the number of successful tests.
1.9881572085609192 (38 / 38) stalin-unknown
2.1500822915753734 (57 / 57) chez-9.5.1-m64
2.738525957787122 (55 / 55) gambitc-v4.9.0
2.7694443820075634 (55 / 55) gerbil-v0.14-DEV
4.205151966183653 (50 / 50) bigloo-4.3a
5.442681840154815 (57 / 57) larceny-1.3
(defun strikethrough (start end)
(interactive "r")
(goto-char (min start end))
(while (< (point) (+ (max start end) (abs (- start end))))
(forward-char)
(insert "̶")))
@ArneBab
ArneBab / jdee.gradle
Last active September 2, 2018 11:24 — forked from ivv-private/jdee.gradle
jdee.gradle
// use by adding
// apply from:'jdee.gradle'
// to build.gradle
def prj = { project ->
"(jdee-project-file-version" (["1.0"])
"(jdee-set-variables" {
"'(jdee-compile-option-directory" ([project.sourceSets.main.output.classesDir])
"'(jdee-junit-working-directory" ([project.projectDir])
Jul 11, 2018 21:27:31:602 (freenet.client.async.SplitFileFetcherSegmentStorage$1, <noname>(5), ERROR): Failed to decode freenet.client.async.SplitFileFetcherSegmentStorage$1@a012067 because of internal error: java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at freenet.client.async.SplitFileFetcherSegmentStorage.innerDecode(SplitFileFetcherSegmentStorage.java:489
)
at freenet.client.async.SplitFileFetcherSegmentStorage.access$000(SplitFileFetcherSegmentStorage.java:40)
at freenet.client.async.SplitFileFetcherSegmentStorage$1.start(SplitFileFetcherSegmentStorage.java:304)
at freenet.support.MemoryLimitedJobRunner$1.run(MemoryLimitedJobRunner.java:91)
at freenet.support.PooledExecutor$MyThread.innerRun(PooledExecutor.java:249)
at freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:189)
at freenet.support.io.NativeThread.run(NativeThread.java:156)
(define* (string-replace-substring s substr replacement #:optional (start 0) (end (string-length s)))
"Replace every instance of substring in s by replacement."
(let ((substr-length (string-length substr)))
(if (zero? substr-length)
(error "string-replace-substring: empty substr")
(let loop
((start start)
(pieces (list (substring s 0 start))))
(let ((idx (string-contains s substr start end)))
(if idx