Skip to content

Instantly share code, notes, and snippets.

Martin Vidner mvidner

  • SUSE
  • Prague, CZ, EU
View GitHub Profile
@mvidner
mvidner / installer-memory-consumption-ideas.md
Last active Jul 7, 2020
installer memory consumption: where to look next
View installer-memory-consumption-ideas.md
@mvidner
mvidner / ps.console
Last active Jun 10, 2020
table_to_csv.sh: Convert a space-delimited table (where the last column may contain spaces) to CSV (comma separated value)
View ps.console
$ ps -f | tee /dev/stderr | ./table_to_csv > ps.csv
UID PID PPID C STIME TTY TIME CMD
martin 12310 3022 0 09:36 pts/13 00:00:00 /bin/bash
martin 13255 12310 0 10:18 pts/13 00:00:00 ps -f
martin 13256 12310 0 10:18 pts/13 00:00:00 tee /dev/stderr
martin 13257 12310 0 10:18 pts/13 00:00:00 /bin/bash ./table_to_csv
@mvidner
mvidner / sendkeys
Last active Jun 2, 2020
Translate a string to "sendkey" commands for QEMU.
View sendkeys
#!/usr/bin/env ruby
# Translate a string to "sendkey" commands for QEMU.
# Martin Vidner, MIT License
# https://en.wikibooks.org/wiki/QEMU/Monitor#sendkey_keys
# sendkey keys
#
# You can emulate keyboard events through sendkey command. The syntax is: sendkey keys. To get a list of keys, type sendkey [tab]. Examples:
#
# sendkey a
View bug-reporting-trio.md

Thank you for the report!

  1. What steps did you take?
  2. What was the expected result?
  3. What was the actual result?
@mvidner
mvidner / unlocking-the-clubhouse.md
Last active Jan 13, 2020
Unlocking the Clubhouse: Women in Computing
View unlocking-the-clubhouse.md

Unlocking the Clubhouse: Women in Computing

Margolis, Jane and Fisher, Allan (2002). Unlocking the Clubhouse: Women in Computing. Cambridge, MA: MIT Press. https://mitpress.mit.edu/books/unlocking-clubhouse

This is an expanded table of contents.

Introduction: Women out of the loop

View lazy_enumerator.rb
#!/usr/bin/ruby
# https://bugzilla.suse.com/show_bug.cgi?id=1132650
# https://github.com/yast/yast-packager/pull/434
def file_properties(filename)
print "."
File.lstat(filename)
end
View emacs-regexp-escaping.md

Emacs has an ususual way of escaping special characters in regular expressions, which I keep forgetting, so here's a summary

Literal Special Emacs bare Emacs escaped
* \*
* 0 or more *
+ \+
+ 1 or more +
? \?
View bidi-problems.md

Problems with Bidirectional (BiDi) Text

If the whole paragraph contains only right-to-left text, it poses no problem. Problems are much likelier to occur if we mix the text directions.

Here I want to write down my knowledge so that the simple parts are easily accessible to beginners, and terms are defined for reference when sorting and solving bugs

TODO: show example fixes to the problems (and note that they may look wrong,

View signal-handling-and-ruby.md
@mvidner
mvidner / 0-mistranslated-bidi-brackets.md
Last active Mar 19, 2019
Mistranslated BiDi Brackets
View 0-mistranslated-bidi-brackets.md

My team got a bug report (bsc#1127563) about misplaced brackets in Arabic translation:

comparison of Arabic and English screen contents

Looking at the first problematic line, "Total System Memory", notice that the Arabic translation has both square brackets in the right-hand version. Let's check the corresponding translations file.

screenshot of the PO file as displayed by GitHub

At the first sight we see a matching left+right bracket, but that is misleading, since they are not in the correct place. The GitHub rendering of that line is confused by the `m

You can’t perform that action at this time.