This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# rcc.sh -- convert a file to a C array of uint16_t's | |
while getopts ":o:h:e:n:v" opt; do | |
case $opt in | |
o) output=$OPTARG | |
;; | |
h) header=$OPTARG | |
;; | |
e) varre=$OPTARG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <time.h> | |
#define BUFSIZE 2<<15 | |
char buforig[BUFSIZE]; | |
char bufcopy[BUFSIZE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Chromium's default action for files it doesn't understand is to | |
# download them, apparently. Also, it looks like .c and other similar | |
# plaintext files are not something Chromium thinks it can read. | |
# So to save myself from having to constantly copy things to a file | |
# with a .txt extension so I can read them and to keep from having to | |
# make Chromium treat .c files and such differently, I've decided to | |
# write this nifty little script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
struct bclass { | |
char *id; | |
char *name; | |
char *brtfile; | |
char *maxfile; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# echoes the full path of the newest download | |
# usage: lastdl.sh [NN], where 1<=NN<100 | |
# adjust this appropriately: | |
DOWNLOADS=$HOME/Downloads | |
# this is horrendous | |
back=$1 | |
case $back in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import select | |
import random | |
import string | |
import socket | |
class Killer: | |
def __init__(self, sock): | |
self.sock = sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import socket | |
import select | |
class AutoJoiner: | |
def __init__(self, server, port, nick, channel, deathmsg): | |
self.sock = socket.socket() | |
self.sock.connect((server, port)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/libmowgli/core/mowgli_string.c b/src/libmowgli/core/mowgli_string.c | |
index 0aa065a..c37a851 100644 | |
--- a/src/libmowgli/core/mowgli_string.c | |
+++ b/src/libmowgli/core/mowgli_string.c | |
@@ -24,11 +24,11 @@ | |
#include "mowgli.h" | |
-mowgli_string_t *mowgli_string_create(void) | |
+mowgli_string_t *mowgli_string_create_size(size_t n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# pinkie.py -- Proof-of-concept IRCd written in Python | |
# [40] alex@theta pinkie $ grep ^class pinkie.py | |
# class Pollable: | |
# class Timer: | |
# class TimerRepeat(Timer): | |
# class AsyncListen(Pollable): | |
# class AsyncLine(Pollable): | |
# class AsyncLoop: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# I haven't tested this. | |
# I don't even know if it works. | |
# Also, -f is different. | |
# In this implementation, -f will automatically confirm -r | |
if [ "$UID" != "0" ]; then | |
echo "You are not logged in as root. Cannot continue." |
OlderNewer