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 | |
# Django 1.4.1 settings for <project-name> project. | |
import os | |
PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..')) | |
DATABASE = os.path.join(PROJECT_DIR, 'db', 'db.sqlite3') | |
DATABASES = { | |
'default': { |
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
[Desktop Entry] | |
Type=Application | |
Name=SumatraPDF | |
MimeType=application/pdf; | |
Exec=env WINEPREFIX="/home/jonas/.wine" wine start /ProgIDOpen SumatraPDF %f | |
NoDisplay=true | |
StartupNotify=true | |
Icon=518F_SumatraPDF.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
[Desktop Entry] | |
Type=Application | |
Name=PDF-XChange Viewer | |
MimeType=application/pdf; | |
Exec=env WINEPREFIX="/home/jonas/.wine" wine start /ProgIDOpen PDF-XChangeViewer.1 %f | |
NoDisplay=true | |
StartupNotify=true | |
Icon=C055_PDFXCview.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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
__author__ = 'Jonas Gröger' | |
import argparse | |
import urllib.request | |
from urllib.error import URLError | |
from time import strftime | |
import os |
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 http://stackoverflow.com/a/6575693/488265 | |
# By http://stackoverflow.com/users/577088/senderle | |
from itertools import chain | |
from collections import defaultdict | |
class Graph(object): | |
def __init__(self, edges, vertices=()): | |
edges = list(list(x) for x in edges) | |
self.edges = edges |
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 | |
# This script executes arbitary commands on a remote server. | |
# Example: ./remote ls -alf | |
# If CMD is provided in the configuration section below | |
# Example (RMT_CMD="ls"): ./remote -alf | |
# If CMD is defined provided in the environment variables | |
# Example: RMT_CMD=ls ./remote -alf |
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 | |
if [ $# -eq 0 ]; then | |
echo "Usage (i.e.): manman curl -u" | |
exit 3 | |
fi | |
if [ $# -eq 1 ]; then | |
man "$1" | |
exit 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
#!/usr/bin/env bash | |
################################################################################ | |
# Description # | |
# Script to disable the mouse acceleration on Ubuntu (and probably other # | |
# distributions). # | |
# # | |
# Author # | |
# Jonas Gröger <jonas.groeger@gmail.com> # | |
# # |
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 | |
# | |
# This script copies the contents of the block below into a file. | |
# Useful for self-extracting configuration files or the like. | |
# | |
# Author: Jonas Gröger <jonas@huntun.de> | |
# | |
<<DATASECTION |
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
quiet_update() { | |
DEBIAN_FRONTEND=noninteractive apt-get update -qq < /dev/null > /dev/null | |
} | |
quiet_install() { | |
DEBIAN_FRONTEND=noninteractive apt-get install -qq "$@" < /dev/null > /dev/null | |
} | |
quiet_install_no_recommends() { | |
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -qq "$@" < /dev/null > /dev/null |