Skip to content

Instantly share code, notes, and snippets.

@petrkle
petrkle / xterm.sh
Created February 19, 2013 08:06
xterm compilation
src2pkg -I xterm.tar.gz -e="--enable-256-color --enable-wide-chars"
@petrkle
petrkle / postfix.sh
Last active December 13, 2015 22:19
postfix - starttls
groupadd -g 200 postfix
useradd -u 200 -d /dev/null -s /bin/false -g postfix postfix
groupadd -g 201 postdrop
make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_TLS -DUSE_CYRUS_SASL -I/usr/include/sasl" AUXLIBS="-L/usr/lib -lsasl2 -lssl -lcrypto"
postconf -e 'disable_mime_input_processing = yes'
postconf -e 'disable_mime_output_conversion = yes'
@petrkle
petrkle / gist:5117253
Created March 8, 2013 15:34
git signingkey
git config --global user.signingkey C2163D7F
@petrkle
petrkle / dz.sh
Created April 2, 2013 12:53
Dist::Zilla
sudo cpan App::cpanminus
sudo cpanm Dist::Zilla
sudo cpanm Dist::Zilla::Plugin::Git
sudo cpanm Dist::Zilla::Plugin::PodWeaver
sudo cpanm Archive::Tar::Wrapper
sudo cpanm Dist::Zilla::Plugin::AutoMetaResources
sudo cpanm Dist::Zilla::Plugin::AutoVersion
sudo cpanm Dist::Zilla::Plugin::NextRelease
@petrkle
petrkle / mount-cifs.sh
Last active December 16, 2015 00:10
mount windows share
sudo /bin/mount -t cifs -o iocharset=utf8,credentials=/etc/win.passwd,uid=petr,gid=users,rw,nobrl //server/c\$ /mnt/tmp
@petrkle
petrkle / gpg.sh
Created May 2, 2013 08:12
gpg encrypt & decrypt
Encrypt:
gpg -er email@example.com backup.tar.gz
Decrypt:
gpg --decrypt backup.tar.gz.gpg > backup.tar.gz
@petrkle
petrkle / flac2ogg.sh
Created May 3, 2013 08:15
Convert flac to ogg
for foo in *.flac; do echo sox $foo -C6 `basename $foo .flac`.ogg; done
@petrkle
petrkle / 01-keyboard-layout.conf
Last active December 17, 2015 00:19
/etc/X11/xorg.conf.d/
Section "InputClass"
Identifier "keyboard-layout"
MatchIsKeyboard "yes"
Driver "evdev"
Option "XkbLayout" "cz"
Option "XkbVariant" "bksl"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
@petrkle
petrkle / ubuntu-unattended-iso.sh
Last active December 17, 2015 10:08
Ubuntu automatic installation to VirtualBox.
#! /bin/bash
# source: http://www.utech.de/2013/05/shell-script-creating-a-cd-for-unattended-ubuntu-server-installations/
#
# General configuration
#
basedir="/home/data/ubuntu-unattended"
downloads="/home/data/ubuntu-unattended.download"
tmpdir="/home/data/ubuntu-unattended.tmp"
builddir="$tmpdir/build.$$"
@petrkle
petrkle / split-for-open-in-7zip.sh
Created June 6, 2013 11:28
Split archive to: file.zip.001, file.zip.002, ... for easy opening with 7-zip in windows.
split --numeric-suffixes=1 -b 100M -a3 file.zip file.zip.