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 | |
class UserNotLoggedInException(Exception): | |
pass | |
class Trip: | |
pass |
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 | |
# -*- coding: utf-8 -*- | |
# Milán Unicsovics, u.milan at gmail dot com | |
# usage: physicist_hostname.py [-h] [-q] | |
# optional arguments: | |
# -h, --help show this help message and exit | |
# -q, --quiet suppress output verbosity | |
# generates a hostname |
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
#!/bin/bash | |
# script for pyenv installation of pygtk3 in ubuntu 12.04 | |
# Adapted from https://gist.github.com/mehcode/6172694 | |
system_package_installed() { | |
if ! dpkg -l | grep -q $1; then | |
sudo apt-get install $1 | |
fi | |
} |
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 | |
# -*- coding: utf-8 -*- | |
# Milán Unicsovics, u.milan at gmail dot com | |
# usage: ./gmailToConky.py | |
# writes out the count of unread gmails | |
import requests | |
from xml.dom.minidom import parseString |
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 urllib | |
import urllib2 | |
import xml.etree.ElementTree as ET | |
def main(): | |
username = 'EMAILADDRESS' | |
password = 'PASSWORD' | |
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 | |
# -*- coding: utf-8 -*- | |
# Milán Unicsovics, u.milan at gmail dot com | |
# usage: ./calToConky.py | |
# writes out upcoming calendar events from Google Calendar | |
import gdata.calendar.service | |
import datetime | |
from textwrap import fill |
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
<snippet> | |
<content><![CDATA[ | |
main:- | |
findall(${2:ReturnValue}, ${1:function(ReturnValue)}, L), write(L), nl. | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>main</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.prolog</scope> | |
</snippet> |
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
Show hidden characters
{ | |
"cmd": ["prolog", "-l", "$file_name", "--goal", "main.", "--noinfo", "--nologo"], | |
"working_dir": "$file_path", | |
"selector": "source.prolog" | |
} |
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 | |
# -*- coding: utf-8 -*- | |
# Milán Unicsovics, u.milan at gmail dot com | |
# usage: ./rssToConky.py | |
# writes out the count of unread RSS feeds from The Old Reader (http://theoldreader.com/) | |
import requests | |
import json |
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
#!/bin/bash | |
# Milán Unicsovics, u.milan at gmail dot com | |
# usage: ./processPost.sh <postname>.html | |
# required: googlecl (http://code.google.com/p/googlecl/) | |
post=$1 | |
imgdir=<RESOURCE DIRECTORY> | |
blogname="<BLOGNAME>" |