Skip to content

Instantly share code, notes, and snippets.

View derfalx's full-sized avatar

Kristoffer Schneider derfalx

  • Germany
View GitHub Profile
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@noromanba
noromanba / weechat-security-settings.mkd
Created September 26, 2015 19:58
recommends settings for security in WeeChat

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 = ""
@gbaman
gbaman / HowToOTG.md
Last active April 16, 2024 22:39
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

@yqritc
yqritc / TextThumbSeekBar.md
Last active April 17, 2024 08:26
SeekBar showing its progress as text on thumb

TextThumbSeekBar

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) {
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
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: https://github.com/chadoe/docker-cleanup-volumes

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

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

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

  1. text_item.py

Let's create the bar