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 | |
VG=xxx | |
BASE=ubuntu-12.04-base | |
DEFSIZE=10G | |
if [ $# -lt 1 -o $# -gt 2 -o "$1" = -h -o "$1" = --help ] | |
then | |
echo "Usage: $0 VolumeName [Size=$DEFSIZE]" >&2 | |
exit 1 |
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 | |
from BaseHTTPServer import * | |
import subprocess | |
from cgi import * | |
class Taviranyito(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html; charset=UTF-8') | |
self.end_headers() |
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 | |
# Get scanned images as a single PDF file from Canon iR2870 user mailboxes. | |
# Original author: ŐRY Máté <orymate at iit.bme.hu> | |
# Public domain. Originally published at https://gist.github.com/orymate | |
# Requirements: imagemagick, pdftk, jbgtopbm <http://www.cl.cam.ac.uk/~mgk25/jbigkit/> | |
#set -x | |
SERVER='10.0.0.xxx' |
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
10 14 * * 6 /home/kabare.sh |
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 | |
DB=/var/tmp/frequent-words | |
CORPUS='ftp://ftp.mokk.bme.hu/Language/Hungarian/Freq/Web2.2/web2.2-freq-sorted.top100k.nofreqs.txt' | |
if [ ! -e "$DB" ] | |
then | |
wget "$CORPUS" -O - | | |
iconv -f latin2 | hunspell -G | hunspell -s | | |
iconv -t ascii//TRANSLIT | tr -d ":'\"" | |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 1 column, instead of 7 in line 9.
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
agent-alreadyon: Az ügynök már be van jelentkezve. Adja meg az ügynökszámát és egy kettős keresztet. | |
agent-incorrect: A bejelentkezés sikertelen. Adja meg az ügynökszámát és egy kettős keresztet. | |
agent-loggedoff: Ügynök kijelentkezett. | |
agent-loginok: Ügynök bejelentkezett. | |
agent-newlocation: Adjon meg egy új melléket és egy kettős keresztet. | |
agent-pass: Adja meg a jelszót és egy kettős keresztet. | |
agent-user: Ügynök bejelentkezés. Adja meg az ügynökszámot és egy kettős keresztet. | |
auth-incorrect: Hibás jelszó. Adja meg újra a jelszót és egy kettős keresztet. | |
auth-thankyou: Köszönjük. | |
conf-adminmenu-162: A némításhoz vagy annak megszüntetéséhez nyomja meg az egyes gombot, a konferencia lezárásához vagy annak megszüntetéséhez a kettest, az utolsó felhasználó kizárásához a hármast, a hangerő beállításához a négyest vagy a hatost, a konferencia bővítéséhez az ötöst, a saját hangerő szabályozásához a hetest vagy kilencest, a kilépéshez a nyolcast. |
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/awk -f | |
BEGIN{FS=";"} | |
{a[i++] = $0; max = max > NF ? max : NF} | |
END{ | |
for (i = 1; i <= max; i++) { | |
for (j in a) { | |
$0 = a[j] | |
printf "%s%s", $i, FS | |
} | |
print "" |
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
# change to temp dir | |
t() { | |
if [ ${1:-0} -eq 0 ] | |
then | |
mkdir -p ~/temp/$(date -d "${1:-0} days ago" +%Y%m%d) | |
fi | |
cd ~/temp/$(date -d "${1:-0} days ago" +%Y%m%d) | |
} | |
# scp if any arguments contain a colon | |
scp () { |
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
scp () { | |
for i in $* | |
do case $i in | |
*:*) command scp $* | |
return $? | |
esac | |
done | |
echo No remote path parameter. Aborting. | |
return 1 | |
} |
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 <signal.h> | |
const char *getsignalname(int n) { | |
static const char *names[NSIG]; | |
static bool firstrun = true; | |
if (firstrun) { | |
firstrun = false; | |
names[SIGIOT ] = "SIGIOT"; | |
names[SIGBUS ] = "SIGBUS"; | |
names[SIGSTKFLT] = "SIGSTKFLT"; |