Skip to content

Instantly share code, notes, and snippets.

@myano
myano / signups.py
Created September 29, 2011 05:55
Old QuakeNet Signups module for jenni
#!/usr/bin/env python
"""
signups.py - Signups Module
Copyright 2011 - Michael Yanovich, yanovich.net
Licensed under the Eiffel Forum License 2.
This module collects a list of names by people who type ".signup"
and then displays them.
"""
@myano
myano / .bashrc
Created October 13, 2011 04:52
bashrc for root
########################################################################
##
## yano's .bashrc
##
########################################################################
########################################
## general settings
########################################
@myano
myano / gist:1357663
Created November 11, 2011 10:11
having trouble installing POD::Usage
05:08 [~/dev/sophia]
(yano@yano) $ ./configure
Checking for Perl 5.10.0 ... OK!
Checking for Carp ... OK!
Checking for FindBin ... OK!
Checking for Getopt::Long ... OK!
Checking for POD::Usage ... not found (install POD::Usage).
Checking for POE ... OK!
Checking for POE::Component::IRC ... OK!
Checking for POSIX ... OK!
05:51 [~/dev/sophia]
(yano@yano) $ ./configure
Checking for Perl 5.10.0 ... OK!
Checking for Carp ... OK!
Checking for FindBin ... OK!
Checking for Getopt::Long ... OK!
Checking for POD::Usage ... not found (install POD::Usage).
Checking for POE ... OK!
Checking for POE::Component::IRC ... OK!
Checking for POSIX ... OK!
@myano
myano / gist:1504768
Created December 21, 2011 05:38
api wrapper for google translate
#!/usr/bin/env python
## index.cgi
import cgitb
cgitb.enable()
import os
import urllib
import urllib2
import web
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^logs/\d\d\d\d\-\d\d-\d\d.*$ logs/index.cgi [L]
RewriteRule ^.osurb/\d\d\d\d\-\d\d-\d\d.*$ .osurb/index.cgi [L]
RewriteRule ^logs/today$ logs/today.php [L]
RewriteRule ^tr/.*$ tr/index.cgi [L]
@myano
myano / gist:1512026
Created December 22, 2011 21:55
check if a list of several lists have the same elements but in any order, essentially the lists should be identical except for order. (number of elements in each should be the same)
def lists_same(lol):
""" helper code that takes a list of list (lol) and checks to make sure
that all elements in each list are in all of the lists (order doesn't
matter) """
if not isinstance(lol, list) or not len(lol) > 0:
return 1
## lol is a list of lists
length = 0
@myano
myano / AAAAAA.py
Last active December 27, 2016 12:55
Python script to check for latest episodes of television shows from tpb. Please use responsibility. Code not the cleanest nor most efficient. Improvements to come.
#!/usr/bin/env python
"""
AAAAAA.py
This script, when placed in a folder with other episodes, will find the next
episode number and query thepiratebay for the infohash of the most popular
match.
This script is only used to find shows that are freely available.
I personally enjoy Pioneer One and a bunch more films provided freely over at
/set weechat.look.highlight_regex \[Alabama\].*Choctaw
/set weechat.look.highlight_regex \\\[Alabama\\\].*Choctaw