Skip to content

Instantly share code, notes, and snippets.

View bloodywing's full-sized avatar
🍑
Peach please

Pierre bloodywing

🍑
Peach please
View GitHub Profile
global recents
recents = dict()
def recent(nick):
global recents
recents[nick] = time()
on_recents = list()
for key in recents.keys():
if recents[key] < time() - 1800:
del recents[key]
@bloodywing
bloodywing / del.py
Created June 19, 2014 11:22 — forked from Nama/del.py
#!/usr/bin/env python3
#Deleting of incoming and outdated SQL backups - Using with crontab
import os, re
d_list = sorted( #Filenames containing unix-timestamp, sorted() will set 'd_list' ordered, from old to new
re.findall(r'\w+\.sql\.gz', #searching for filenames
','.join(os.listdir('/home/kirika')))) #Listing all files in directory and putting them comma-seperated together
for i in range(len(d_list)-4): #Count of found files -4
os.remove(d_list[i]) #the newest 4 files wont be deleted
@bloodywing
bloodywing / ybot.py
Last active December 29, 2015 10:09
#! /usr/bin/env python
"""Yama's A.T.S.P.-Bot for IRC-Tasks"""
import irc.bot
import irc.strings
import re
import logging
from threading import Timer
from irc.client import ip_numstr_to_quad, ip_quad_to_numstr
irc.client.ServerConnection.buffer_class.errors = 'ignore'
@bloodywing
bloodywing / .Xdefaults
Created October 1, 2012 13:24 — forked from monokrome/.Xdefaults
Mimicing iTerm2's pastel color scheme in RXVT/RXVT-Unicode
rxvt.background: #000000
rxvt.foreground: #D3D2D3
rxvt.color0: #000000
rxvt.color1: #FF7768
rxvt.color2: #ABFA68
rxvt.color3: #FFFD88
rxvt.color4: #98D0FE
rxvt.color5: #FF85FD
rxvt.color6: #CACBFE
rxvt.color7: #EFEFEF