Skip to content

Instantly share code, notes, and snippets.

@lslezak
lslezak / qt_pixel_ratio.cc
Last active July 4, 2016 18:02
Print the QGuiApplication::devicePixelRatio() value
// This simple utility prints the device pixel ratio reported by Qt library
// How to compile:
// - save into "qt_pixel_ratio" directory
// (the directory name determines the binary name, see later)
// - run "qmake-qt5 -project"
// - run "qmake-qt5"
// - run "make"
// Then you can run the "./qt_pixel_ratio" binary.
// (Use the name of the parent directory if you used another directory name
@lslezak
lslezak / test.rb
Last active August 23, 2016 08:58
Ruby test
#! /usr/bin/env ruby
# Could you guess the result? :-)
# Download this script and run it ("ruby test.rb")
о = "foo"
puts o
@lslezak
lslezak / byzanz-record-window
Created February 16, 2017 16:47
byzanz-record-window script
#!/bin/bash
#byzanz-record-window
#dependency checks
if ! which xwininfo &>/dev/null; then
echo "Dependency xwininfo not met."
deps_ok=NO
fi
@lslezak
lslezak / docker_for_sp2.sh
Last active June 2, 2017 17:00
Automate Docker Support for SP2
#!/bin/sh
# This script adds Docker support for the SP2 branches,
# see https://trello.com/c/V0OaC4DT.
#
# - Run it in an YaST repo checkout.
# - Check the diff displayed in the browser
# - Wait for the Travis results
# - Debug/fix the issues manually if it does not build
@lslezak
lslezak / Yuml.me Example.md
Last active March 14, 2018 15:40
yuml.me example
@lslezak
lslezak / markdown_tricks.md
Last active April 18, 2019 10:08
Markdown Tricks

Markdown

Here are some Markdown formatting tricks. Please note that it depends on the actual markdown renderer, some feature might work only in specific environments.

All these tricks work at Github, but might not work elsewhere.

Collapsed Details at GitHub

If you have very long log or details you might make them collapsible

@lslezak
lslezak / README.md
Last active April 24, 2020 08:51
(Un)used YaST Modules

(Un)used YaST Modules

The Problem

We maintain many YaST modules and it's quite difficult to keep all of them in good shape.

So we eeed to know which modules are used and are important for the users so we could spend more time with them. On the other hand, the modules which are used rarely can live with less intensive maintenance.

@lslezak
lslezak / README.md
Last active March 29, 2023 10:04
YaST Installer Memory Consumption

YaST Installer Memory Consumption

Ruby 2.1+ allows tracing object allocations, see more details in this article.

I enabled it and dumped the Ruby memory usage data in a SLES12-SP2 Beta3 installation

Notes

@lslezak
lslezak / README.md
Last active July 11, 2023 09:17
Translations

Agama and Translations

The Agama installer is actually a Cockpit plugin. Because Cockpit already supports translations it would make sense to check it and reuse the translation process (or some parts) to avoid reinventing the wheel.

See the Cockpit i18n documentation for more details.