Skip to content

Instantly share code, notes, and snippets.


Kristoffer Schneider derfalx

  • Germany
View GitHub Profile

WeeChat Screenshot

Here I will show you how to create a bar very similar to the nicklist bar, but instead of showing nickname, it will show znc commands, whenever you click on a command, weechat will send a "help the_command_you_just_clicked" and insert the name of the command in the input bar, then enter any arguments required to the command and press enter.

You will need the following script


Let's create the bar

bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

yqritc /
Last active Jun 16, 2021
SeekBar showing its progress as text on thumb


Define a custom class extending SeekBar to show the progress text on thumb of SeekBar.

public class TextThumbSeekBar extends SeekBar {

    private int mThumbSize;
    private TextPaint mTextPaint;

    public TextThumbSeekBar(Context context) {
gbaman /
Last active Sep 21, 2022
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

noromanba / weechat-security-settings.mkd
Created Sep 26, 2015
recommends settings for security in WeeChat
View weechat-security-settings.mkd

WeeChat security settings

recommends settings for security in WeeChat

disable leave msg

do not say when /part and /quit

/set irc.server_default.default_msg_part = ""
/set irc.server_default.default_msg_quit = ""
pascalpoitras /
Last active Sep 23, 2022
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 3.6-dev

Enable mouse

/mouse enable

Secured data