Skip to content

Instantly share code, notes, and snippets.


Stephan Henrichs Kilobyte22

View GitHub Profile
Kilobyte22 /
Last active Aug 4, 2017
Proof of Concept Plugin system for rust
extern crate libloading as lib;
extern crate libplugin as plugin;
use plugin::Plugin;
fn main() {
let lib = lib::Library::new("plugins/").unwrap();
unsafe {
let func: lib::Symbol<unsafe fn() -> Box<Plugin>> = lib.get(b"gimme_pluginz\0").unwrap();
let plugin: Box<Plugin> = func();
View pass-gen
title=$(dmenu -p 'password title: ' < /dev/null)
if [[ "$title" != "" ]]; then
if [[ -f ~/.password-store/"$title".gpg ]]; then
ans=$(echo -e 'no\nyes' | dmenu -p 'answer: ' -mesg 'Password exists, do you want to overwrite?' -only-match)
if [[ "$ans" == yes ]]; then
pass generate -f -c "$title" 30 && \
notify-send "Password Store" "Password generated"

Keybase proof

I hereby claim:

  • I am kilobyte22 on github.
  • I am kilobyte ( on keybase.
  • I have a public key whose fingerprint is 2F75 B61F 7F77 B92D 507C 07FC B3AC 4F40 BC39 6055

To claim this, I am signing this object:

# i3blocks script to display current ping
# Licensed under the MIT license
use strict;
use warnings;
sub ping {
my $host = shift;
View Rules for the Game
1. You lose the game by thinking about it
2. When you lose the game you have to publically announce it making everyone around you lose it as well
3. After losing the game you have 30 minutes to forget it again
4. By knowing these rules you are automatically participating
Congratulations, you just lost the game
View envrun.c
#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
void usage() {
printf("Usage: environment command [arguments]\n");
int main(int argc, char **argv) {
View exampleconf.yml
someone: NOPE
somegroup: YOU GUYS ALL SUCK
#default: uncomment this to set a default message
View uploadscreenshot.rb
Script to upload screenshots one a press of a button
warning: for this script you need the 'ruby-dbus' gem, also, this will most likely never work on Windows or OSX. Its written for linux after all. By default it utilizes KDE tools. i'll happily add more if requested.
CFGNAME = "#{Dir.home}/.uploadscreenshot.yml"
require 'dbus'
View Quotes
jakimfett | (I do admit, the first time I plugged my Microsoft keyboard into my Mac which is running linux, I sorta expected *something* to esplode horribly)
Kilobyte22 / tinychat.rb
Last active Dec 25, 2015
My Tinychat weechat script
View tinychat.rb
def weechat_init
Weechat.register('tinychat', 'Kilobyte', '1.0', 'GPL3', 'Adds small chat windows for channels. Intended mainly ad widget for small split screen windows', 'gtfo', '')
Weechat.hook_command("tinychat", "manages tinychat windows", "[make] || [setmainwindow]", '', "make %(irc_channels)", "cmd_tinychat", '')
Weechat.hook_print("", "", "", 0, "hook_print", "")
def gtfo