Andrew Udvare Tatsh

View log-reader.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python
 
import re
import sys
import yaml
 
line_prog = re.compile(r"""^(?P<ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) # IP Address
[^\]]+ # ? What do the numbers represent in this field(s)?
\[(?P<date>\d{1,2}\/(?:[^\/]+)\/\d{4})\: # Date
(?P<time>(?:\d{2}\:){2}\d{2}\s+[\-\+]\d{1,4})\]\s # Time
View fix-tatsh1tb-and-empty-dirs.sh
1 2 3 4 5 6 7 8 9 10
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
 
# Note that this requires
#
# ENV{ID_FS_USAGE}=="filesystem", ENV{UDISKS_FILESYSTEM_SHARED}="1"
#
# to be in a rules file for udev
View sync-debs.sh
1 2 3 4 5 6 7 8 9
#!/usr/bin/env bash
 
rsync='rsync --progress --force --delete-before -rltvd'
target="${1:-tatshphone}"
target_local="${2}"
 
if [ -z "$target_local" ]; then
target_local="/mnt/spare/backup/${target}"
fi
View fix-borders.sh
1 2
# from https://bugs.launchpad.net/ubuntu/+source/clearlooks-phenix-theme/+bug/1205225
sudo sed -i '1060s/.*/padding: 1px;/' /usr/share/themes/Clearlooks-Phenix-3.6/gtk-3.0/gtk-widgets.css && sudo sed -i '174,176s/.*/@define-color menubar_gradient_a shade(@core_color_b);/' /usr/share/themes/Clearlooks-Phenix-3.6/gtk-3.0/gtk.css
View user-agents.md

iTunes 11

iTunes/11.1.3 (Macintosh; OS X 10.9) AppleWebKit/537.71
View uaex.bms
1 2 3 4 5 6 7 8 9
# extract Unity3D engine *.assets files
# (c) 2012-10-15 by AlphaTwentyThree of XeNTaX
 
get EXT extension
if EXT == "resS" # no TOC -> scan
cleanexit
endif
endian big
get FSIZE asize
View pushd.py
1 2 3 4 5 6 7 8 9
from os import chdir, getcwd
from os.path import realpath
 
class PushdContext:
cwd = None
original_dir = None
 
def __init__(self, dirname):
self.cwd = realpath(dirname)
View fix-all-linkshare-itunes.php
1 2 3 4 5 6 7 8 9
#!/usr/bin/env php
<?php
$_SERVER['REMOTE_ADDR'] = '99.293.39.39';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['SERVER_SOFTWARE'] = 'nginx/0';
 
const HREF_SEARCH = 'click.linksynergy';
$regex = '/href="(https?\:\/\/click\.linksynergy[^"]+)"/';
$add = 'at=10l4D3';
View parse-xchat-logs.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python
 
import argparse
import datetime
import glob
import json as JSON
import os
import re
import sys
from dateutil import parser as date_parser, tz
View encode_helpers.py
1 2 3 4 5 6 7 8 9
import glob
import subprocess as sp
from os import remove as rm
 
DIVX2PASS_GLOB = '*2pass*.log*'
 
def clean_up():
files = glob.glob(DIVX2PASS_GLOB)
files.extend(['audio.aac', 'output.x264'])
Something went wrong with that request. Please try again.