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 | |
# some PDFs are only delivered with multiple pages “nup”d onto one, | |
# e.g. 4 slides arranged 2×2 on one PDF page. This script separates them. | |
# horizontal×vertical nup layout, e.g.: '1x1' '2x2', '1x2' | |
NUP='1x1' | |
# When re-nuping, add a frame? 'true' or 'false' | |
FRAME='false' |
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
\usetikzlibrary{calc} | |
\begin{tikzpicture} | |
\def\b{.2} | |
\def\ts{1.5} | |
\tikzstyle{glass}=[fill opacity=0.1] | |
\coordinate (empty) at (0,0); | |
\coordinate (borders) at ($(empty) + (\ts+\b, 0)$); | |
\coordinate (corners) at ($(borders) + (\ts+\b, 0)$); |
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
namespace WindowsGame2 | |
import System.IO | |
import Microsoft.Xna.Framework | |
public class Extractor(Game): | |
private graphics as GraphicsDeviceManager | |
private basePath as string | |
private outPath as 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 | |
''' | |
Hey, this is GPLv3 and copyright 2010 Jezra | |
''' | |
import sys, os | |
import gtk | |
import webkit | |
import markdown #http://www.freewisdom.org/projects/python-markdown/ |
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 python2.7 | |
# -*- coding: utf-8 -*- | |
import sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
app = QApplication(sys.argv) | |
window = QMainWindow() |
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 perl | |
use strict; | |
use warnings; | |
use autodie; | |
use feature 'switch'; | |
use English '-no_match_vars'; | |
$| = 1; | |
my $msg = ''; |
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 -*- | |
import cookielib | |
from urllib2 import HTTPCookieProcessor, build_opener | |
from urllib import urlencode | |
from BeautifulSoup import BeautifulSoup | |
# the login data | |
login_data = { | |
'login_username': u'USERNAME', | |
'login_password': u'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 python3 | |
import sys, pprint | |
import os.path | |
# save old exception hook | |
sys._old_excepthook = sys.excepthook | |
def assert_hook(exc_type, exception, traceback): | |
if exc_type.__name__ == "AssertionError": |
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 | |
ROOT_UID=0 | |
FIX_JAR_MIME="rm -vf /usr/share/mime/packages/sun-java*-jre.xml | |
update-mime-database /usr/share/mime" | |
if [ "$UID" -ne "$ROOT_UID" ]; then | |
kdesudo -c "$FIX_JAR_MIME" | |
kbuildsycoca4 #only possible if run as underprivileged | |
else | |
"$FIX_JAR_MIME" |
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 | |
''' | |
A script to generate the barebone implementation of scala’s | |
Function# and Tuple# types for use in java. | |
I made this to allow Java projects to specify function signatures | |
which play nice with scala, without depending on scala’s stdlib. | |
''' |
OlderNewer