Skip to content

Instantly share code, notes, and snippets.

View ha7ilm's full-sized avatar
🇭🇺

András Retzler ha7ilm

🇭🇺
  • Belgium
  • 17:48 (UTC -12:00)
View GitHub Profile
@ha7ilm
ha7ilm / xft.md
Last active September 6, 2021 07:59
change Xft.dpi on the fly

This is normally in .Xresources:

$ cat .Xresources 
Xft.dpi: 130

To change it on the fly:

@ha7ilm
ha7ilm / coppeliasim.md
Created August 24, 2021 11:15
_ZdlPvm, version Qt_5 with Coppeliasim

Problem

error: undefined symbol: _ZdlPvm, version Qt_5"

Solution

You did run ./coppeliaSim. Run ./coppeliaSim.sh instead.

@ha7ilm
ha7ilm / remote-clipboard.md
Last active August 19, 2021 19:51
copying image from clipboard of remote machine to clipboard of local machine over SSH in Linux
#!/bin/sh
rm /tmp/cliprect.png
ssh user@example.com "DISPLAY=:0 xclip -selection clipboard -t image/png -o -" > /tmp/cliprect.png
if [ $? -eq 1 ]; then
    notify-send -t 10000 "failed getting png from remote machine"
else
    xclip -selection clipboard -t image/png -i /tmp/cliprect.png
fi
@ha7ilm
ha7ilm / wacom-tip.md
Last active August 11, 2021 10:35
Mapping button 4 of Wacom Intuos BT under Linux
xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 <something>

For some reason, button #4 is actually Button 8. It turned out from xev output.

Building Inkscape from source on Ubuntu 20.04.2 LTS

sudo apt install libdouble-conversion-dev libpotrace-dev libgtkmm-3.0-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev
git clone https://gitlab.com/inkscape/inkscape/
cd inkscape
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/a_sensible_install_directory/inkscape_install ..
make -j6

How to open a Stylus Labs Write .svgz file with Inkscape?

cat something.svgz | gunzip | inkscape -

@ha7ilm
ha7ilm / viber-qt-crash.md
Last active March 5, 2023 16:47
Fix Qt related Viber crash on Ubuntu

I was getting the following error message while trying to run Viber on Ubuntu:

Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
[1]    929803 abort (core dumped)  /opt/viber/Viber

Solved by running:

Match whole word in Google Docs search & replace

To match all the asdf enable regexp and type this in the search box: \basdf\b

@ha7ilm
ha7ilm / e55bt.md
Last active December 4, 2019 09:53

JBL E55BT

I had a problem with my new bluetooth headphones JBL E55BT.

When connected to my Linux PC, there was an unacceptable background noise and I could hear the audio driver switch on and off even during silent periods inside music.

Solution: The headphones have a separate volume control, which can be adjusted with the buttons on the device. (This is not connected to the mixer volume on the PC.) By default, that was adjusted to maximum for some reason. Turning it down and adjusting a higher volume with Pulseaudio helped to reduce the noise to an acceptable level.

@ha7ilm
ha7ilm / i3.conf
Last active October 22, 2021 16:11
Prompt to rename current workspace in i3 so that the new name starts with the number of the current workspace, e.g. "1:term"
bindsym $mod+u exec i3-input -F "rename workspace to \"$(i3-msg -t get_workspaces | jq -r \"map(select(.focused))[0].num\"):%s\"" -P 'New name for this workspace: '