Skip to content

Instantly share code, notes, and snippets.

Kyle Fuller kylef

Block or report user

Report or block kylef

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kylef
kylef / Procfile
Created Apr 14, 2013
Static server for Heroku using river
View Procfile
web: gunicorn -w 4 serve:wsgi
@kylef
kylef / inspircd_channels
Created Sep 24, 2011
InspIRCd plugins for munin
View inspircd_channels
#!/bin/bash
case $1 in
config)
echo "graph_title Channel count"
echo "graph_vlabel channels"
echo "channels.label channels"
echo "channels.draw AREA"
;;
*)
@kylef
kylef / craftirc.cpp
Created Sep 19, 2011
CraftIRC ZNC Module
View craftirc.cpp
#include "Modules.h"
#include "Chan.h"
class CCraftIRC : public CModule {
public:
MODCONSTRUCTOR(CCraftIRC) {
AddHelpCommand();
AddCommand("Alias", static_cast<CModCommand::ModCmdFunc>(&CCraftIRC::AliasCommand), "username [nick]");
AddCommand("Nick", static_cast<CModCommand::ModCmdFunc>(&CCraftIRC::NickCommand), "nick", "Set the nickname the CraftIRC bot uses.");
}
@kylef
kylef / yubikey.cpp
Created Sep 14, 2011
ZNC module for YubiKey
View yubikey.cpp
extern "C" {
#include <ykclient.h>
}
#include <znc/Modules.h>
#include <znc/znc.h>
#include <znc/User.h>
#define CLIENT_ID 1
#define DEFAULT_TOKEN_ID_LEN 12
@kylef
kylef / PKGBUILD
Created Jul 5, 2011
lxc package for arch linux
View PKGBUILD
pkgname=lxc
pkgver=0.7.4.2
pkgrel=1
pkgdesc="Linux Containers"
arch=('i686' 'x86_64')
url="http://lxc.sourceforge.net/"
depends=('bash' 'perl')
license=('LGPL')
source=("http://lxc.sourceforge.net/download/lxc/$pkgname-$pkgver.tar.gz" lxc.rcd lxc.confd)
md5sums=('36fcb0f6a39d2f55130421f342f24ef3' '520594461912e084c220ca37eb97afd2' 'efb0c46839136842e9d3617924a9b5b5')
@kylef
kylef / inspircd-stats.sh
Created Jun 23, 2011
InspIRCd stats from m_http_stats
View inspircd-stats.sh
#!/bin/sh
address="https://localhost:8081/stats"
count_type=$1
if [[ "$count_type" != "user" && "$count_type" != "channel" ]]; then
echo "Usage: $0 <user|channel>"
exit 1
elif
@kylef
kylef / userserv.cpp
Created May 4, 2011
ZNC module to auth you with UserServ
View userserv.cpp
/*
* Copyright (C) 2004-2011 See the AUTHORS file for details.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#include "User.h"
@kylef
kylef / znc-modgen.sh
Created Mar 30, 2011
Template generator for a znc module
View znc-modgen.sh
#!/bin/sh
# Usage: ./modgen.sh CFooMod > foo.cpp
# Usage: ./modgen.sh CFooMod global > foo.cpp
if [ ! "$1" ]; then
echo "No module class name supplied"
exit 1
fi
@kylef
kylef / pyeval.py
Last active Sep 25, 2015
Python Evaluate for ZNC modpython
View pyeval.py
import sys
import re
from code import InteractiveInterpreter
import znc
class pyeval(znc.Module, InteractiveInterpreter):
module_types = [znc.CModInfo.UserModule, znc.CModInfo.NetworkModule]
description = 'Evaluates python code'
@kylef
kylef / preventpart.cpp
Created Feb 21, 2011
ZNC Module to prevent a client from parting a IRC channel
View preventpart.cpp
/*
ZNC Module to prevent a client from parting a IRC channel
This is useful for use with github's IRC service hook.
*/
#include "Modules.h"
class CPreventPart : public CModule {
public:
MODCONSTRUCTOR(CPreventPart) {}
You can’t perform that action at this time.