Skip to content

Instantly share code, notes, and snippets.

View AeroNotix's full-sized avatar
💭
🇺🇦

Aaron France AeroNotix

💭
🇺🇦
View GitHub Profile
@hook.subscribe.client_new
def togrouper(window):
program_dict = {'firefox-aurora': 'Home',
'emacs': 'emacs',
'thunderbird': 'mail',
'urxvt': 'terminal',
'skype': 'skype'}
with open('/home/xeno/file', 'a') as fname:
fname.write(window.window.get_wm_class()[0])
@hook.subscribe.client_new
def togrouper(window):
program_dict = {'firefox-aurora': 'Home',
'emacs': 'emacs',
'thunderbird': 'mail',
'urxvt': 'terminal',
'skype': 'skype'}
with open('/home/xeno/file', 'a') as fname:
fname.write(window.window.get_wm_class()[0])
@hook.subscribe.client_new
def grouper(window, windows=[{'firefox-aurora': 'Home',
'emacs': 'emacs',
'thunderbird': 'mail',
'urxvt': 'terminal',
'skype': 'skype'}]):
windowtype = window.window.get_wm_class()[0]
if windowtype in windows[0]:
window.togroup(windows[0][windowtype])
@hook.subscribe.client_new
def grouper(window, windows=[{'firefox-aurora': 'Home',
'emacs': 'emacs',
'thunderbird': 'mail',
'urxvt': 'terminal',
'skype': 'skype'}]):
windowtype = window.window.get_wm_class()[0]
if windowtype in windows[0]:
window.togroup(windows[0][windowtype])
def filter_by(filters):
def wrapper(function):
def inner_wrap(wrapped_args):
if wrapped_args not in filters:
return
return function(wrapped_args)
return inner_wrap
return wrapper
@filter_by(manager_list)
def arg_types(*types):
def wrapper(function):
def inner_wrap(*wrapped_args):
if len(types) != len(wrapped_args):
raise Exception(''.join(
[
'Incorrect argument amount, this ',
'argument requires {} argument and ',
'you provided {} to the decorator.']
).format(len(wrapped_args), len(types)))
body {
background-color:#2E4A60;
color: #F2EEE9;
text-align: center;
font-family:Consolas,'Lucida Console','DejaVu Sans Mono',monospace;
}
#content {
background-color: #ffffff;
font-family: sans-serif;
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles.css">
</head>
<body>
<a href="http://github.com/AeroNotix">
<img style="position: absolute; top: 0; right: 0; border: 0;"
from ctypes import (windll, Structure, byref, POINTER,
c_char, c_ubyte, c_bool, c_uint, c_float)
import time
class CTSharedData(Structure):
_fields_ = [
("uiLoad", c_uint * 256),
("uiTjMax", c_uint * 128),
("uiCoreCnt", c_uint),
("uiCPUCnt", c_uint),
def bloglist(request):
db = Blog.objects.exclude(blog_title="about")
if not len(db):
raise Http404
return render_to_response("blogmode.html",
{'blog': db,
'githuburl': GITHUB},
RequestContext(request))