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/python | |
# encoding: utf-8 | |
import sys, os, itertools as it | |
try: | |
root = sys.argv[1] | |
except IndexError: | |
root = os.getcwd() |
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
perl -ne 'while (/(?:name|pathl)(\d+):/gc) { $n = $1; /(.{$n})/gc; print "$1\n"; }' |
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/python | |
from poster.encode import multipart_encode | |
from poster.streaminghttp import register_openers | |
import urllib2 | |
import simplejson | |
import sys | |
try: | |
input_file = open(sys.argv[1], 'rb') |
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
# Maintainer: Konstantin Stepanov <[email protected]> | |
pkgname=meandmyshadow | |
pkgdesc='Puzzle/platform game written by Luka Horvat.' | |
url='http://meandmyshadow.sourceforge.net/index.html' | |
pkgrel=1 | |
pkgver=0.2 | |
arch=('i686' 'x86_64') | |
provides=('meandmyshadow') | |
source=("$pkgname-$pkgver-src.tar.gz::https://sourceforge.net/projects/$pkgname/files/0.2/$pkgname-$pkgver-src.tar.gz/download") |
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
use strict; | |
package Pearlwall; | |
use base 'Exporter'; | |
our @EXPORT = qw(iface port net mode oneof from to filter mangle nat raw flush with by user group marked list forwarding chain record on off); | |
my $_table = ''; | |
my $_dry_run = 0; | |
BEGIN { |
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/sh | |
case "$1" in | |
left-of|right-of|above|below|same-as) D=$1 ;; | |
*) D=left-of ;; | |
esac | |
xrandr | awk -v dir=$D 'out { gsub("[^0-9.]", "", $2); print "--output " out " --mode " $1 " --rate " $2 pout; pout=" --" dir " " out; out=0 } / connected/ { out=$1 }' | xargs xrandr |
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
__all__ = [] | |
def export(value): | |
__all__.append(value.__name__) | |
return value | |
import sys | |
module = sys.modules[__name__] | |
class Context(object): |
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
# | |
# Python Template Markup Language | |
# Simple Python DSL for HTML and (a little) CSS templating. | |
# | |
# Example: | |
# | |
# from ptml import * | |
# | |
# with html5 as out: | |
# with head: |
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
mplayer -vo null -playlist playlist.m3u -loop 0 -shuffle | awk -F ': ' '/^ title: / { title=$2; gsub(/'\''/, "&\\\\&&", title) } /^ artist: / { artist=$2; gsub(/'\''/, "&\\\\&&", artist) } /^Starting playback/ { system("notify-send -i /usr/share/icons/oxygen/22x22/actions/media-playback-start.png Playing '\''" artist " — " title "'\''") }' |
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
ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", DRIVERS=="usb-storage", GOTO="automount_go" | |
ACTION=="remove", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", DRIVERS=="usb-storage", RUN{program}+="/bin/rmdir /media/%E{AUTOMOUNT_NAME}" | |
GOTO="automount_end" | |
LABEL="automount_go" | |
PROGRAM="/usr/local/bin/automount-helper.py $number", GROUP="disk", TAG+="systemd", ENV{AUTOMOUNT_NAME}="$result{1}", ENV{SYSTEMD_WANTS}="usb-mount@$result{2}.service" | |
LABEL="automount_end" |
OlderNewer