Skip to content

Instantly share code, notes, and snippets.

/* Sigyn - A reasonably sane IRC bot.
* Copyright (c) 2011-2012 Alyx Wolcott <[email protected]>
* Released under the BSD license.
*/
#include "sigyn.h"
mowgli_heap_t *channel_heap;
mowgli_heap_t *chanuser_heap;
/*
* Copyright (c) 2014 Alyx Wolcott <alyx -at- malkier.net>
* Rights to this code are as documented in doc/LICENSE.
*
* To use this module, add a lastfm_api value to the gameserv{}
* config block containing your Last.FM API key.
*/
#include "../api/http.h"
#include "../gameserv/gameserv_common.h"
#ifndef MODE_H
#define MODE_H
static struct cmode_ mode_list[] = {
{ 'i', CMODE_INVITE },
{ 'm', CMODE_MOD },
{ 'n', CMODE_NOEXT },
{ 'p', CMODE_PRIV },
{ 's', CMODE_SEC },
{ 't', CMODE_TOPIC },
{ 'r', CMODE_REGONLY},
#include <pokemon.h>
int main(int argc, char **argv)
{
FILE *f;
PkmnState s;
int i;
// Replicate Gen 1
s->IgnoreAbilities(true);
#!/usr/bin/python2
import csv, psycopg2, sys
conn = psycopg2.connect(database="pokedex", user="pokedex", password="pokedex17984", host="meth.guru")
def berries():
print(" Importing Berries")
cur = conn.cursor()
cur.execute("CREATE TABLE berries (id int, item_id int, firmness_id int, natural_gift_power int, natural_gift_type_id int, size int, max_harvest int, growth_time int, soil_dryness int, smoothness int, PRIMARY KEY(id));")
f = open("../berries.csv", "rb")
d = csv.DictReader(f)
to_db = [(i["id"], i["item_id"], i["firmness_id"], i["natural_gift_power"], i["natural_gift_type_id"], i["size"], i["max_harvest"], i["growth_time"], i["soil_dryness"], i["smoothness"]) for i in d]
@alyx
alyx / ns_backdate.c
Last active October 22, 2017 16:25
Put this in modules/contrib/ns_backdate.c.
/*
* Copyright 2014 Alyx Wolcott
* Rights to this code are as documented in doc/LICENSE.
*
* Gives services the ability to backdate nicknames
*
*/
#include "atheme.h"
/*
* Copyright 2014 Alyx Wolcott
* Rights to this code are as documented in doc/LICENSE.
*
* Gives services the ability to backdate nicknames
*
*/
#include "atheme.h"
@alyx
alyx / gist:4a73491df0f8a1abffbf
Last active October 22, 2017 16:24
atheme-services account degradation

Account Degradation

  1. Current System

  1. Account reaches an age (e.g. 30d)
  2. Services considers the account expired
  3. Services removes this account. This frees all nicknames associated with the account for re-registration and removes this account, including all metadata, group and channel access from the database.
  4. There is no D. That's all that happens.
#include "detect.hpp"
#include <gtest/gtest.h>
char useragents[][128] = {
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36", //0 Linux, Chrome, Desktop
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", //1 OS X, Chrome, Desktop
"Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25", //2 OS X, Safari, Mobile
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A", //3 OS X, Safari, Desktop
"Mozilla/5.0 (X11; Mageia; Linux x86_64; rv:10.0.9) Gecko/20100101 Firefox/10.0.9", //4 Linux, Firefox, Desktop
"Mozilla/5.0 (Android; U; Android; pl; rv:1.9.2.8) Gecko/20100202 Firefox/3.5.8", //5 Linux, Firefox, Mobile
@alyx
alyx / partyfile.py
Created May 26, 2019 05:57
shitty vcsparty concept ruleset
# Just .py for syntax highlighting tbh
# %p = project
# %r = repo
# %u = url
# %c = commit id
# %a = author
# %b = branch
# %f = files
# %m = commit message
# --