Skip to content

Instantly share code, notes, and snippets.

Fred Hatfull fhats

Block or report user

Report or block fhats

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
@fhats
fhats / m_sanick.c
Created Feb 8, 2015
sanick for unreal IRCd. Originally found at https://pub.maff.me.uk/code/m_sanick.c
View m_sanick.c
/*
* Unreal Internet Relay Chat Daemon, src/modules/m_sanick.c
* (C) 2000-2001 Carsten V. Munk and the UnrealIRCd Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
View keybase.md

Keybase proof

I hereby claim:

  • I am fhats on github.
  • I am fhats (https://keybase.io/fhats) on keybase.
  • I have a public key whose fingerprint is 02B2 0441 9399 BC2B 0BC6 4EAB FED1 B7C5 911F F0BB

To claim this, I am signing this object:

View gist:6b901d8cad2b7ce9329b
$ znc-buildmod clientbuffer.cpp
Building "clientbuffer.so" for ZNC 1.4... clientbuffer.cpp:33:44: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
virtual EModRet OnUserRaw(CString& line) override;
^
clientbuffer.cpp:34:66: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
virtual EModRet OnSendToClient(CString& line, CClient& client) override;
^
clientbuffer.cpp:36:70: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
virtual EModRet OnChanBufferStarting(CChan& chan, CClient& client) override;
^
@fhats
fhats / flask_routes_in_doc
Created Dec 11, 2011
Subclass of Flask to automatically store routes in the view handler's docstrings
View flask_routes_in_doc
class FlaskWithRouteDocs(Flask):
"""A subclass of Flask to allow using :route: and :methods: in docstrings, a la Sphinx."""
def route(self, rule, **options):
def decorator(f):
route_dec = super(FlaskWithRouteDocs, self).route(rule, **options)
methods_str = ','.join(options.get('methods', ['GET']))
if f.__doc__ is not None and ":route:" in f.__doc__:
f.__doc__ = f.__doc__.replace(":route:", rule)
else:
@fhats
fhats / tastes.py
Created Feb 7, 2011
Last.FM Tag Cloud Retriever
View tastes.py
lastfm_api_key = "295e485894bdf30203b53607f1d94e34"
lastfm_api_root = "http://ws.audioscrobbler.com/2.0/"
result_limit = 15
import urllib
import urllib2
import json
import string
def getLastFmJson(args):
You can’t perform that action at this time.