Skip to content

Instantly share code, notes, and snippets.

Ladislav Slezák lslezak

Block or report user

Report or block lslezak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lslezak
lslezak / markdown_tricks.md
Last active Apr 18, 2019
Markdown Tricks
View markdown_tricks.md

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 / Yuml.me Example.md
Last active Mar 14, 2018
yuml.me example
View Yuml.me Example.md
@lslezak
lslezak / docker_for_sp2.sh
Last active Jun 2, 2017
Automate Docker Support for SP2
View docker_for_sp2.sh
#!/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 / byzanz-record-window
Created Feb 16, 2017
byzanz-record-window script
View byzanz-record-window
#!/bin/bash
#byzanz-record-window
#dependency checks
if ! which xwininfo &>/dev/null; then
echo "Dependency xwininfo not met."
deps_ok=NO
fi
View Docker at Travis.md

Travis

Docker

  • Allows running any Linux program in a container
@lslezak
lslezak / test.rb
Last active Aug 23, 2016
Ruby test
View test.rb
#! /usr/bin/env ruby
# Could you guess the result? :-)
# Download this script and run it ("ruby test.rb")
о = "foo"
puts o
@lslezak
lslezak / README.md
Last active Jul 7, 2016
YaST Installer Memory Consumption
View README.md

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 / qt_pixel_ratio.cc
Last active Jul 4, 2016
Print the QGuiApplication::devicePixelRatio() value
View qt_pixel_ratio.cc
// 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
You can’t perform that action at this time.