Skip to content

Instantly share code, notes, and snippets.

View txdv's full-sized avatar

Andrius Bentkus txdv

View GitHub Profile
@hunterbridges
hunterbridges / twitch_irc.md
Last active March 31, 2024 08:28
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";
@Taehun
Taehun / nf.c
Created October 9, 2012 01:08
Linux Kernel Module Example: Netfilter
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netfilter_ipv4.h>
#include <linux/skbuff.h>
#include <linux/udp.h>
#include <linux/ip.h>
/* This function to be called by hook. */
static unsigned int
hook_func(unsigned int hooknum,
@leppie
leppie / gist:2868328
Created June 4, 2012 13:20
CallWithEscapeContinuation Usage
using System;
using System.Linq;
class Program
{
sealed class EscapeContinuation<T> : Exception
{
public T Value { get; private set; }
public void Raise(T value)
@txdv
txdv / Epoch.cs
Created July 20, 2011 16:04
Epoch class for handling unix times
using System;
namespace Epoch
{
public class Epoch
{
static readonly DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0);
static readonly DateTimeOffset epochDateTimeOffset = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);