Skip to content

Instantly share code, notes, and snippets.

@HarHar
HarHar / 4chan_desktop.py
Last active October 8, 2015 21:13
aylmao
#!/usr/bin/env python
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
app = QApplication(['4chan desktop app'])
desktop = QDesktopWidget()
geometry = desktop.screenGeometry(0)
@HarHar
HarHar / loader.py
Created January 16, 2014 19:26
quietnet loader for disabling xscreensaver
#!/usr/bin/env python
import subprocess
import sys
import signal
target = sys.argv[1]
def nop(*args): pass
signal.signal(signal.SIGHUP, nop)
a = subprocess.Popen(['python', target], stdin=-1, stderr=-1, stdout=-1)
@HarHar
HarHar / fix.py
Created November 16, 2013 01:19
Converts MAL entries to ANN entries on Futaam Put it on ..../Futaam/interfaces/fix.py Run "futaam --fix yourdbfile"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@HarHar
HarHar / vndb.py
Created June 16, 2013 16:19
VNDB Python API Wrapper
#!/usr/bin/env python
"""
@author: HarHar (https://github.com/HarHar)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@HarHar
HarHar / masshighlight.py
Created May 31, 2013 03:40
Mass highlighting script for Weechat
import weechat
from time import sleep
# -*- coding: utf8 -*-
weechat.register("masshighlight", "HarHar", "1.0", "GPL3", "fgt", "", "")
hook = weechat.hook_command('mhilight', 'Mass Highlight', "", "", "msg", "mh", "")
weechat.prnt("", "Mass highlighting lock and loaded")
def mh(data, buffer, args):
buffer = weechat.current_buffer()
@HarHar
HarHar / gist:5439833
Last active December 16, 2015 13:09
Nick Sniper
#/usr/bin/env python
import socket, random, threading, re
from time import sleep
#Configs
network = 'IRC.SERVER.NET'
port = 6667
groups = [{'nicks': [], 'password': ''}, {'nicks': [], 'password': ''}]
interval = 60 #interval in seconds between each nick change
@HarHar
HarHar / converter.py
Last active December 11, 2015 00:09
Put this on the Futaam root
#!/usr/bin/env python
from interfaces.common import *
from libYAAM import YAAMDb
olddb = raw_input('Path to YAAM database file> ')
newdb = raw_input('Path to new Futaam file> ')
o = YAAMDb(olddb)
ni = []
i = 0
@HarHar
HarHar / shell_colors.py
Created January 6, 2013 03:51
A very sad attempt at translating terminal color codes to irc color codes on shell.py
# -*- coding: utf-8 -*-
# =============================================================================
# shell.py (c) March 2006, 2009 by Kolter <kolter@openics.org>
#
# Licence : GPL v2
# Description : running shell commands in WeeChat
# Syntax : try /help shell to get some help on this script
# Precond : needs weechat >= 0.3.0 to run
#
#
@HarHar
HarHar / Kumagawa.py
Created January 2, 2013 20:31
2cool4u
import weechat
# -*- coding: utf8 -*-
weechat.register("kumagawa", "HarHar/t4w", "1.0", "GPL3", "2cool", "", "")
hook = weechat.hook_command('x', '『』 it', "[msg]", "", "msg", "kewl", "")
def kewl(data, buffer, args):
buffer = weechat.current_buffer()
weechat.command(buffer, chr(15) + '『 '+ args + chr(15) +' 』')
return weechat.WEECHAT_RC_OK
@HarHar
HarHar / serialControl.py
Created November 18, 2012 22:31
Cellphone control
import serial
from sys import argv
from time import sleep
from select import select
try:
filename, device = argv
except:
print 'Usage: ' + argv[0] + ' [device]'
exit()