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 | |
#Requires: | |
# mplayer, mencoder. mkvmerge | |
# libx264, liblame | |
HaveOpt() { | |
local needle=$1 | |
shift | |
while [[ $1 == -* ]]; do |
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
/* | |
* strbuf.c | |
* Andrew Domaszek | |
* CodeLibrary/dynamic_string | |
* | |
* Copyright September 6, 2013, Andrew Domaszek | |
* All rights reserved. | |
* | |
Redistribution and use in source and binary forms, with or without |
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 | |
#set -x | |
: <<'END' | |
autoscreen.bashrc | |
Andrew Domaszek | |
project: random bits of bash | |
Copyright (C) September 8, 2013, Andrew Domaszek |
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 | |
conn_string = "host='localhost' dbname='radio' user='radio_queue' password='apassword'" |
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 | |
import subprocess | |
import psycopg2 | |
conn_string = "host='localhost' dbname='pdns' user='pdns' password=''" | |
def call_rectifyzone(zone): | |
proc = 0 | |
try: |
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
awk '{print gensub(/([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*) - (.*)/,"\\4.\\3.\\2.\\1.in-addr.arpa. IN PTR \\5.", $0)}' << "EOF" | |
192.168.1.101 - test.localdomain | |
192.168.1.105 - test2.example.com | |
EOF |
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 random; | |
import os; | |
import copy; | |
random.seed(os.urandom(20)); | |
def Mode1GenFcn(): | |
dg = [] | |
for x in range(4): | |
dg.append(random.randint(1,6)) |
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
#include <stdio.h> | |
#include <stdarg.h> | |
void f1() { | |
printf("a\n"); | |
} | |
void f2() { | |
printf("b\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
#!/bin/bash | |
function contains() { | |
local n=$# | |
local value=${!n} | |
for ((i=1;i < $#;i++)) { | |
if [ "${!i}" == "${value}" ]; then | |
return 0 | |
fi | |
} |
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
######## DO SETUP ######## | |
e=accD | |
pre=UD | |
jildir=$DATDIR/../jil | |
for file in "`ls -1 \"$jildir\"`" | |
do | |
ostr=`grep delete_box $file | gawk -v s=$pre '{if (NR>1) {exit(0)};gsub(/\\\$S/,s,$2);print $2}'` | |
echo $ostr | |
stat=`jr $ostr | egrep '^'$ostr | sed -e 's@.* \([A-Z][A-Z]\) .*@\1@'` | |
echo $ostr $stat |
OlderNewer