Skip to content

Instantly share code, notes, and snippets.

View chris-x86-64's full-sized avatar

Christopher Smith chris-x86-64

View GitHub Profile
@chris-x86-64
chris-x86-64 / gist:8969525
Created February 13, 2014 04:01
An example of copyright disclaimer.
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdEfXyAQME2SXo7kUpUNq+pMpAm60fSNct0WKiRRXv1Z2HBT3VUKVH9aq2CYH+7wDQG8xrZmSu+gSSTy909nkEYJz8682ujdHLUwpnxKC3ADJZrmI5vWDqxlb8lv/Q7f3Kru6D4Z00qRQ5I/V8ycESyjfEd+X2SCsPwAvbINXfipSX2+8rwExDQ+Dy8C0ierOwqSZVDA34tBSFLD5Jnk337C2vLjPaSuVbxbhjjwRDwOwwqLh0eLGzquxOSI4aoZZksyvXH4CFU9+cinD+7MkFkkCumVTHjYDffIFNwb1I3uaWy2+w0Lew18niJhpjvxTDzKEgvqnOEWyDKen+etkT chris@lambo
@chris-x86-64
chris-x86-64 / minecraft.conf
Created August 3, 2014 05:46
Minecraft semi-auto startup using Upstart. Used in conjuction with the "Auto-Shutdown" mod.
description "Minecraft SemiAuto-Startup"
start on socket PROTO=inet PORT=25565
stop on runlevel [06]
console log
chdir /home/minecraft/whatever
setuid minecraft
setgid minecraft
respawn
@chris-x86-64
chris-x86-64 / gist:2e3ac9846fa5cea374f4
Created December 22, 2014 05:58
Example Perl-CGI Apache2 config
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName aho.baka.com
DocumentRoot /home/aho/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/aho/app/>
@chris-x86-64
chris-x86-64 / ocr.py
Last active August 31, 2015 00:51
Recursive batch OCR script (Requires Tesseract-OCR or Cuneiform).
import os
import sys
import json
from optparse import OptionParser
from PIL import Image
from pyocr import pyocr
from pyocr.builders import TextBuilder
def get_opt():
parser = OptionParser()
@chris-x86-64
chris-x86-64 / gyoza.pl
Created April 1, 2012 03:49
Gyoza no Oushou
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
use utf8;
use Net::Twitter::Lite;
use YAML::Syck;
my $conf = YAML::Syck::LoadFile('config.yml');
@chris-x86-64
chris-x86-64 / populate_db.pl
Last active December 18, 2015 20:59
Used in conjunction with Saitan-bot. This populates initial tweet data in saitan.db.
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
use utf8;
use Data::Dumper;
use AnyEvent::Twitter::Stream;
use YAML::Syck;
@chris-x86-64
chris-x86-64 / auth.pl
Created June 23, 2013 07:20
Very simple example of OAuth token request (Net::Twitter::Lite)
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use Net::Twitter::Lite::WithAPIv1_1;
use YAML::Syck;
use Data::Dumper;
my $conf = YAML::Syck::LoadFile('config.yml')->{oauth};
@chris-x86-64
chris-x86-64 / userstream.pl
Created June 23, 2013 07:24
Very simple example of AnyEvent::Twitter::Stream
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use Encode;
use utf8;
use Data::Dumper;
use AnyEvent::Twitter::Stream;
use YAML::Syck;
@chris-x86-64
chris-x86-64 / markov_test.pl
Created June 29, 2013 08:09
Saitan-bot MarkovChain tester.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use YAML::Syck;
use lib './lib';
use SaitanBot::Think;