Skip to content

Instantly share code, notes, and snippets.

@hackathi
hackathi / .i3-config
Created November 8, 2015 18:50
Media Monkey 3 Installation under wine
bindsym XF86AudioPlay exec --no-startup-id /usr/local/bin/mm-control play
bindsym XF86AudioStop exec --no-startup-id /usr/local/bin/mm-control stop
bindsym XF86AudioNext exec --no-startup-id /usr/local/bin/mm-control next
bindsym XF86AudioPrev exec --no-startup-id /usr/local/bin/mm-control prev
# you may want to set the correct sink ID here
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -- -10%
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 -- +10%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle
@hackathi
hackathi / Makefile
Last active August 29, 2015 14:22
libGee.External.Capstone.Proxy.so
CC = gcc # C compiler
CFLAGS = -DNOT_WIN -fPIC -Wall -Wextra -O2 -g # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = libGee.External.Capstone.Proxy.so # target lib
SRCS = proxy.c # source files
OBJS = $(SRCS:.c=.o)
.PHONY: all
private readonly ConcurrentBag<Tuple<Func<IUser, object>, Func<IUser, Task>>> GlobalUserListeners = new ConcurrentBag<Tuple<Func<IUser, object>, Func<IUser, Task>>>();
private readonly ConcurrentDictionary<int, IList<Tuple<Func<IUser, object>, Func<IUser, Task>, object>>> UserListeners = new ConcurrentDictionary<int, IList<Tuple<Func<IUser, object>, Func<IUser, Task>, object>>>();
private readonly ConcurrentBag<Tuple<Func<IChannel, object>, Func<IChannel, Task>>> GlobalChannelListeners = new ConcurrentBag<Tuple<Func<IChannel, object>, Func<IChannel, Task>>>();
private readonly ConcurrentDictionary<int, IList<Tuple<Func<IChannel, object>, Func<IChannel, Task>, object>>> ChannelListeners = new ConcurrentDictionary<int, IList<Tuple<Func<IChannel, object>, Func<IChannel, Task>, object>>>();
public void AddListener<T>(Func<T, object> mapper, Func<T, Task> listener) {
ConcurrentBag<Tuple<Func<T, object>, Func<T, Task>>> globalListeners;
ConcurrentDictionary<
@hackathi
hackathi / install.sh
Last active August 29, 2015 14:19
Automatic Phalanger 3 installer (Debian 7, Debian 8, Ubuntu)
#!/bin/bash -e
echo "=============================================================================
| Automatic Phalanger on Debian/Ubuntu installer |
|---------------------------------------------------------------------------|
| A few notes: |
| - Be sure to run this script as root. |
| - Downloading stuff can take a while |
| - Autohosting is enabled, so php files are automatically executed |
| - Tested on Debian 7 (wheezy) and Debian 8 (but should work on Ubuntu) |
@hackathi
hackathi / nowplaying-skript
Last active August 29, 2015 14:09
Now-Playing-Script for KVIrc. Needs AMIP to get the data from your media player
%secp = $($mediaplayer.position() / 1000);
%minp= $(%secp / 60);
%secp = $(%secp - $(%minp / 60));
%secp %= 60;
%secl = $($mediaplayer.length() / 1000);
%minl= $(%secl / 60);
%secl = $(%secl - $(%minl / 60));
%secl %= 60;
if(%secp < 10) {