This file contains 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
{ | |
"queues": [ | |
{ | |
"id": "82a5819f-84fe-4755-8dc2-c6f439ef454e", | |
"t": "single-consumer", | |
"name": "Priority Queue 1", | |
"prefix": "P-", | |
"bg_color": "#B0BF1A", | |
"fg_color": "#000000", | |
"attr_name": "__attr-7jgG%$'s", |
This file contains 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 collections import OrderedDict | |
def make_tree(strings): | |
"""Take a list of strings and returns a dict tree with chars as keys. | |
>>> make_tree(['cat', 'car', 'dog']) | |
{'c': {'a': {'r': {}, 't': {}}}, 'd': {'o': {'g': {}}}} | |
""" | |
root = branch = OrderedDict() |
This file contains 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
#include <string.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <ifaddrs.h> | |
#include <sys/types.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> | |
#include <linux/wireless.h> | |
This file contains 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
"""sendmail django email backend class.""" | |
import threading | |
from django.conf import settings | |
from django.core.mail.backends.base import BaseEmailBackend | |
from subprocess import Popen,PIPE | |
class EmailBackend(BaseEmailBackend): | |
def __init__(self, fail_silently=False, **kwargs): |
This file contains 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 { | |
margin: 0; | |
padding: 0; | |
background: #000; | |
color: #fff; | |
text-align: center; | |
font-family: Helvetica; | |
} | |
#wrapper { |
This file contains 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
#include <directfb.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#define DFBCHECK(x...) \ | |
do { \ | |
DFBResult err = x; \ | |
if (err != DFB_OK) { \ | |
printf("%s <%i>:", __FILE__, __LINE__); \ |
This file contains 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
#!/usr/bin/env python | |
# Copyright (c) 2012 Eduardo Felipe Castegnaro, http://github.com/edufelipe/ | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to | |
# the following conditions: |
This file contains 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
#!/usr/bin/env python | |
import cStringIO | |
import json | |
import sys | |
from pygments import highlight | |
from pygments.formatters import TerminalFormatter | |
from pygments.lexers.web import JavascriptLexer |