Skip to content

Instantly share code, notes, and snippets.

View Jezza's full-sized avatar
🤔
Rewriting all of the things...

Jezza

🤔
Rewriting all of the things...
  • Germany
View GitHub Profile
@NPException
NPException / shockyCheatsheet.md
Last active August 1, 2017 08:48
Shocky cheatsheet

Shocky cheatsheet

This is a collection of placeholders to use within factoids for the bot Shocky on EsperNet IRC. They were collected by manually checking this list for used placeholders and testing them on EsperNet.

Factoid placeholders

Placeholder Description
%arg{idx}[-[to_idx]] examples: %arg0%, %arg1-3%, %arg4-% - prints out the provided argument with index idx. A range of arguments to be printed can also be given by appending a "-" to the index. If no to_idx is provided, all following arguments will be printed out.
%bot% the name of the bot
%chan% current channel
@chanjarster
chanjarster / logstash-tomcat.conf
Created September 22, 2015 07:41
Tomcat Access Log Logstash configration
input {
file {
path => "/path/to/tomcat/logs/localhost_access_log*.txt"
}
}
filter {
grok {
match => {
"message" => "%{COMBINEDAPACHELOG} %{IPORHOST:serverip} %{NUMBER:serverport} %{NUMBER:elapsed_millis} %{NOTSPACE:sessionid} %{QS:proxiedip} %{QS:loginame}"
@Cr4sh
Cr4sh / fork.c
Created March 19, 2016 15:08
fork() for Windows
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Copyright (c) 2012 William Pitcock <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@mmozeiko
mmozeiko / test.c
Last active April 28, 2024 20:52
gtk widget from x11 window
// gcc test.c `pkg-config --cflags --libs gtk+-3.0 gdk-3.0` -lX11 && ./a.out
#include <X11/Xlib.h>
#include <unistd.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
static void my_gtk_realize(GtkWidget* widget, gpointer user)
@kralo
kralo / IKEV2C_0USER.ini
Last active July 31, 2024 09:36
[HOWTO] configuration example for lancom host to ubuntu 16.04 vpn client
[PROFILE1]
Name=T-IKEV2C_0USER
ConnMedia=21
ConnMode=0
SeamRoaming=1
PriVoIP=1
Gateway=1.2.3.4
PFS=14
UseComp=0
IkeIdType=3