Various approaches to writing efficient, scalable and maintainable CSS.
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
moved to: https://github.com/vindolin/flashair_sync |
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
import urwid | |
class MyEdit(urwid.Edit): | |
def keypress(self, size, key): | |
if key == 'enter': | |
return True | |
urwid.Edit.keypress(self, size, key) | |
edit = MyEdit(edit_text='Press ENTER to see my problem!') |
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 python3 | |
import urwid | |
palette = [ | |
('highlight', '', '', '', 'bold,#ff0', ''), | |
('highlight_focus', '', '', '', 'bold,#ff0', '#da0'), | |
('item_focus','', '', '', '', '#da0'), | |
] | |
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 python3 | |
import urwid | |
palette = [ | |
('highlight', '', '', '', 'bold,#ff0', ''), | |
('item_focus','', '', '', '', '#da0'), | |
] | |
class Item(urwid.WidgetWrap): |
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 | |
# run with get_total_history.py <(history) | |
import fileinput | |
history = [ | |
line.strip().partition(' ')[2] | |
for line in fileinput.input()] |
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
import android | |
from sendmail import sendemail | |
from sys import stdout | |
from time import sleep | |
trapped = False | |
image_path = '/sdcard/cat.jpg' | |
counter = 0 | |
mail_tpl = ''' |
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
# -*- coding: utf-8 -*- | |
# needs socketIO_client (pip install socketIO_client) | |
# Simply shows the bitcoin price in $ from mtgox.com and the total price of all the bitcoins you own. | |
# Screenshot: http://i.imgur.com/UatFwkM.png | |
# Donations --> 1HpQQds9wUFykgwKyzXp747SAb6374RjUL | |
from sys import stdout | |
import argparse | |
import locale |
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
# -*- coding: utf-8 -*- | |
# Simply shows the bitcoin price in $ from mtgox.com and the total price of all the bitcoins you own. | |
# Screenshot: http://i.imgur.com/UatFwkM.png | |
# Donations --> 1HpQQds9wUFykgwKyzXp747SAb6374RjUL | |
import requests | |
import json | |
from time import sleep | |
from sys import stdout |
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 __future__ import division, print_function | |
from gi.repository import Clutter | |
import random | |
from random import randint | |
from colorsys import rgb_to_hls, hls_to_rgb | |
from sys import argv | |
Clutter.init([]) | |