Skip to content

Instantly share code, notes, and snippets.

View vindolin's full-sized avatar
:octocat:
Available for hire 😎

Thomas Schüßler vindolin

:octocat:
Available for hire 😎
View GitHub Profile
@vindolin
vindolin / bitcoin_watch.py
Last active December 16, 2015 01:18
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
# -*- 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
@vindolin
vindolin / mtgox_price_ws.py
Last active December 16, 2015 03:29
Rewrite of https://gist.github.com/vindolin/5353600, now uses a websocket instead of polling. Needs the socketIO_client module. Install: pip install socketIO_client Basic usage: python mtgox_price_ws.py 33 where 33 is the amount of bitcoins you own Donations -> 1HpQQds9wUFykgwKyzXp747SAb6374RjUL
# -*- 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
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 = '''
import sys
from gi.repository import Clutter
stage_size = (800, 600)
Clutter.init(sys.argv)
stage = Clutter.Stage()
stage.set_size(*stage_size)
stage.set_title('Problems...')
@vindolin
vindolin / gist:10755038
Last active August 29, 2015 13:59
clutter grid sizing problem
import sys
from gi.repository import Clutter
stage_size = (800, 600)
Clutter.init(sys.argv)
stage = Clutter.Stage()
stage.set_size(*stage_size)
stage.set_title('Problems...')
import sys
from gi.repository import Clutter
Clutter.init(sys.argv)
stage = Clutter.Stage()
stage.set_size(350, 200)
stage.set_title('Fixed Position')
def color(string):
@vindolin
vindolin / too high
Created April 20, 2014 05:47
cura problem
M140 S60.000000
M109 T0 S210.000000
T0
M190 S60.000000
;Sliced at: Sat 19-04-2014 17:01:35
;Basic settings: Layer height: 0.1 Walls: 1 Fill: 20
;Print time: #P_TIME#
;Filament used: #F_AMNT#m #F_WGHT#g
;Filament cost: #F_COST#
;M190 S60 ;Uncomment to add your own bed temperature line
# from http://stackoverflow.com/a/14776693/999193
import sys
def myexcepthook(type, value, tb):
import traceback
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import TerminalFormatter
class SerialThreadTX(SerialThread):
def run(self):
self.msggen.directdisplay('==== Started TX Thread')
self.tracemanager.start_trace()
while(True):
if self.timeToQuit.isSet():
break
# The maximum TX buffer for the COM-port driver set in w32Serial.py.