This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) |