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 sys, os | |
def extract_pkg(package_file): | |
result = {} | |
package_file = package_file.replace('.deb', '') | |
(result['package'], tmp) = package_file.split('_') | |
(tmp, result['build']) = tmp.split('-') | |
tmp = tmp.split('.') |
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
{ | |
"Description" : "Template to create a US proxy server", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type" : "String" | |
}, | |
"VPNServerPort" : { | |
"Description" : "TCP/IP port of the OpenVPN server", | |
"Type" : "String", |
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 json, subprocess, os, re, HTMLParser | |
exportcmd = 'plutil -convert json -o - %s' % os.path.expanduser('~/Library/Preferences/widget-com.apple.widget.stickies.plist') | |
out = json.loads(subprocess.check_output(exportcmd.split(' '))) | |
stickies = [] | |
htmlparser = HTMLParser.HTMLParser() |
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 os | |
from time import time | |
from datetime import datetime | |
camfolder = os.path.expanduser('~/Dropbox/Camera Uploads') | |
for filename in os.listdir(camfolder): | |
# OSX folder icons are contained in this directory. |
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 os, time, subprocess, sys | |
from datetime import datetime | |
my_path = os.path.realpath(__file__) | |
my_version = os.path.getmtime(my_path) | |
startdir = '/home/luzifer/Dropbox/tex-convert' | |
gentex_command = '/home/luzifer/bin/gentex' | |
def log(string): |
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
javascript:(function(){d=function(){m=document.getElementsByName('description');if(m.length>0){return%20m[0].getAttribute('content');}%20else%20return%20'';};f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'&v=5&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})() |
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
\usepackage{eso-pic} | |
\makeatletter | |
\AddToShipoutPicture{% | |
\setlength{\@tempdimb}{.5\paperwidth}% | |
\setlength{\@tempdimc}{.5\paperheight}% | |
\setlength{\unitlength}{1pt}% | |
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){% | |
\makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.85}% | |
{\fontsize{4cm}{4cm}\selectfont{DRAFT}}}}% |
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 | |
# This script is designed to work with an HooToo IPCamera you can for example | |
# buy at http://goo.gl/V3H2W - It will take one picture every n seconds and | |
# store them named by current time in one folder so you later on can assemble | |
# them into a timelapse video. | |
# | |
# Copyright (C) 2013 Knut Ahlers <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
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 | |
targetfile="scan_$( date +"%Y-%m-%d_%H-%M-%S" ).jpg" | |
# Get image from scanner | |
scanimage --format=tiff --resolution 300 > /tmp/scan.tiff | |
# TODO: Search for correct error message (need it to be thrown by scanimage before implementing) | |
if [ $(grep -q 'cups' /tmp/scan.tiff ) ]; then | |
# Calculate size of file without error message |
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
$ port installed requested 2>/dev/null | grep @ | sed "s/^ *\([a-zA-Z0-9-]*\).*/\1/" | sort | uniq | xargs |
OlderNewer