Skip to content

Instantly share code, notes, and snippets.

View pkazmierczak's full-sized avatar
at the gym.

Piotr Kazmierczak pkazmierczak

at the gym.
View GitHub Profile
pkazmierczak /
Created January 2, 2012 15:33
Simple script for automatic backup using duplicity
DATE="/bin/date +%R-%d-%m-%y"
BACKUP_COMMAND="$DUPLICITY --exclude=/media/backups --exclude=/home/piotr/.cache --exclude=/home/piotr/.thumbnails --exclude=/home/piotr/.gvfs --exclude=/home/piotr/.xsession-errors --exclude=/home/piotr/.recently-used.xbel --exclude=/home/piotr/.recent-applications.xbel --exclude=/home/piotr/.Private --exclude=/tmp --exclude=/proc --exclude=/sys --exclude=/home/piotr/.local/share/Trash --exclude=/home/piotr/muzzik --exclude=/home/piotr/filmy --exclude=/home/piotr/.beagle --exclude=/home/piotr/.opera --exclude=/home/piotr/.thumbnails --exclude=/home/piotr/.VirtualBox --exclude=/home/piotr/.cache --exclude=/home/piotr/downloads --include=/home/piotr --exclude=** --no-encryption / file:///media/backups --volsize=250 --archive-dir=/home/piotr/.cache/deja-dup"
# Sanity checks
if test -z "$BASH" ; then
pkazmierczak / jekyll-create-tag-pages-rakefile.rb
Created January 3, 2012 09:05 — forked from kez/jekyll-create-tag-pages-rakefile.rb
This fork works for 'tags', not 'categories'.
View jekyll-create-tag-pages-rakefile.rb
desc 'Generate tags page'
task :tags do
puts "Generating tags..."
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site =
pkazmierczak / another_atl_model.tex
Created November 25, 2012 17:15
Example ATL model
View another_atl_model.tex
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,
state/.style={circle,draw,node distance=3cm},
big state/.style={ellipse,draw,node distance=3cm},
pkazmierczak / emacs-auctex-config.el
Last active October 25, 2023 08:51
This is a Gist that contains all the code snippets from my blogpost about Emacs for LaTeX configuration:
View emacs-auctex-config.el
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-save-query nil)
;(setq TeX-PDF-mode t)
(require 'flymake)
(defun flymake-get-tex-args (file-name)
(list "pdflatex"
(list "-file-line-error" "-draftmode" "-interaction=nonstopmode" file-name)))
View Symbol list - Todos.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Symbol List</string>
pkazmierczak / quick-player.scpt
Last active August 29, 2015 14:00 cheater
View quick-player.scpt
tell application "iTunes"
set mySongs to every track of library playlist 1 whose artist is "Uri Caine Trio"
repeat with theTrack in mySongs
play theTrack
repeat until (player position > ((get duration of the current track) / 2)) or (player position > 240)
delay 0.5
end repeat
end repeat
end tell
pkazmierczak /
Created December 10, 2014 20:23
import numpy
import random
class Agent():
def __init__(self,
location={'x': 0, 'y': 0},
pkazmierczak / .vimrc
Created March 5, 2015 12:51
My vim configuration
View .vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Vundles!
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
pkazmierczak / gist:3204b7ef7703e231ff9e
Last active August 29, 2015 14:21
EC2 ami configuration for Typo3 7
View gist:3204b7ef7703e231ff9e
sudo sed '/deb-src/d' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install python-setuptools apache2 mysql-client php5 php5-cli php5-gd php5-mysql memcached php5-curl php5-memcache php5-xcache ppthtml unrtf xlhtml
sudo apt-get clean
wget # we need newest s3cmd for Frankfurt V4 auth
cd s3cmd
sudo python install
pkazmierczak / thesis.tex
Created August 19, 2015 14:02
changing paper size to conform to UiB's rules
View thesis.tex
\documentclass[ twoside,openright,titlepage,numbers=noenddot,
headinclude,%1headlines,% letterpaper a4paper