Skip to content

Instantly share code, notes, and snippets.

From d860acdd324b7be0b264e926b1f76a69c99a27d1 Mon Sep 17 00:00:00 2001
From: Alyx <[email protected]>
Date: Sun, 19 Feb 2012 04:55:57 -0700
Subject: [PATCH] Remove double-declared typedef, change kqueue to use the
correct types when defining things.
---
src/libmowgli/eventloop/eventloop.h | 2 --
src/libmowgli/eventloop/kqueue_pollops.c | 2 +-
2 files changed, 1 insertions(+), 3 deletions(-)
@alyx
alyx / issues.js
Created May 27, 2012 21:53
JIRA issue information thing
var irc = require('irc'),
JiraApi = require('jira').JiraApi;
var user = 'user',
pass = 'pass',
ircuser = 'user',
ircpass = 'pass';
var jira = new JiraApi('http', 'jira.arinity.org', 80, user, pass, 'latest');
var client = new irc.Client('irc.staticbox.net', 'issues', { userName: 'issues', realName: 'Sigyn Issue Monitor', port: 6667, channels: ['#sigyn']});
@alyx
alyx / hash.py
Created May 27, 2012 23:58
Sigyn sha512 command
import _sigyn as s
import hashlib
def hash(command, target, data, nick, user, host, hostmask):
hashable = data[data.find(" ")+1:];
s.irc_privmsg(target, hashlib.sha512(hashable).hexdigest());
return;
s.cmd_add(hash, "sha512", 1, s.AC_NONE, "Returns a hex digest of the SHA512 hash of the given string", "<string>")
#include "mowgli.h"
int main(void)
{
char *x, *y;
x = mowgli_strdup("the quick brown fox jumped over the lazy dog");
printf("%s\n", x);
y = x+10;
printf("%s\n", y);
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "LS" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" ls
.SH PROLOG
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
.SH NAME
ls \- list directory contents
@alyx
alyx / octothorpeprogramming.md
Created June 20, 2012 19:55
#programming rules

#Programming

Rules

  • Don't be stupid.
  • No flaming over language choices
  • No obnoxious plugging of third party libs instead of offering "real" solutions
  • Use a pastebin for all code blocks longer than 5 lines.
@alyx
alyx / clean.c
Created June 22, 2012 05:45
A (failed) attempt to make the code from agl's repo actually readable.
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <errno.h>
typedef struct
{
void *child[2];
uint32_t byte;
07:29 -Global(Global@services.)- [Network Notice] bikcmp - It's Friday, Friday
07:29 -Global(Global@services.)- [Network Notice] Gotta get down on Friday
07:29 -Global(Global@services.)- [Network Notice] Everybody's lookin' forward to the weekend (weekend)
07:29 -Global(Global@services.)- [Network Notice] -
07:29 -Global(Global@services.)- [Network Notice] Friday, Friday
07:29 -Global(Global@services.)- [Network Notice] Gettin' down on Friday
07:29 -Global(Global@services.)- [Network Notice] Everybody's lookin' forward to the weekend
07:29 -Global(Global@services.)- [Network Notice] Partyin', partyin' (Yeah)
07:29 -Global(Global@services.)- [Network Notice] Partyin', partyin' (Yeah)
07:29 -Global(Global@services.)- [Network Notice] Fun, fun, fun, fun
@alyx
alyx / tor.c
Created July 2, 2012 20:27
Module for dealing with tor-based hostnames for Arinity.org's Tor gateway.
#include "atheme.h"
DECLARE_MODULE_V1(
"saslserv/tor", false, _modinit, _moddeinit,
PACKAGE_STRING,
"Alyx <[email protected]>"
);
static void on_user_identify(user_t *u);
static void on_user_sethost(user_t *u);
git_bundles = [
"git://github.com/chrismetcalf/vim-taglist.git",
"git://github.com/godlygeek/tabular.git",,
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/scrooloose/nerdcommenter.git",
"git://github.com/scrooloose/syntastic.git",
"git://github.com/sjl/gundo.vim.git",
"git://github.com/tpope/vim-abolish.git",
"git://github.com/tpope/vim-fugitive.git",