Skip to content

Instantly share code, notes, and snippets.

CorcString **corcstr_split(CorcString *in, char sep)
{
int i = 0;
char *instr, *ptr, *placeholder;
CorcString **out, *cs;
instr = strdup(in->string);
placeholder = instr;
while (ptr = strchr(placeholder, sep))
START_TEST (test_str_append)
{
CorcString *cs;
cs = corcstr_create();
corcstr_append(cs, "moo", 3);
fail_if(strcmp(cs->string, "moo") != 0,
"CorcString appending failed!");
corcstr_append_char(cs, ' ');
#include <stdio.h>
#include "str.h"
void test_str_raw()
{
char string[512];
corcstr_copy_raw(string, "moo", 512);
if(strcmp(string, "moo") != 0)
printf("test_str_raw() failed!\n");
19:07 < xXaimee[emovamp]Xx> solarized is a theme, taglist is for ctags shit, perldoc is for perl documentation (really don't need that as I don't perl anymore), gist gists (That's broke,
should rm that), ack is for grepping, but uses `ack (which is a better grep)` instead, snipmate gives snippes, which are cool chunks of code that can basically be
autopasted in, jellybeans is a theme, mac-classic is a theme, html5 is for highlighting html5 elements, autocorrect is for... autocorrecting, perl is more perl
shit, nerdtree explores fs, nerdcommenter is the only mass commenting solution that doesn't suck, syntastic checks syntax, gundo is a magical undo tree shower,
textile is for textile (a thing kinda like markdown) highlighting, abolish is for dealing wiht text replacement, cucumber is for stupid cuke highlighting, fugitive
is for vim integration, haml = haml highlighting,
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",
@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);
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 / 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;
@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.
.\" 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