Skip to content

Instantly share code, notes, and snippets.

@lahwaacz
lahwaacz / PKGBUILD
Created June 24, 2013 15:16
fixed PKGBUILD for geomspace
# Maintainer: Michael Kogan <michael dot kogan at gmx dot net>
pkgname=geomspace
pkgver=0.11
pkgrel=1
pkgdesc="A browser for geometric (i.e. Euclidean, Riemann, Minkowski) spaces"
arch=('i686' 'x86_64')
url="https://sourceforge.net/projects/geomspace/"
license=('GPL')
depends=('libxpm' 'mesa' 'fltk')
@lahwaacz
lahwaacz / PKGBUILD
Created May 4, 2013 18:05
fixed PKGBUILD for multimarkdown-git
# Contributor: Felix Hanley <felix@seconddrawer.com.au>
pkgname=multimarkdown-git
_pkgname=multimarkdown
pkgver=3.7.1.2.g0d9c20e
pkgrel=1
pkgdesc="Expanded version of John Gruber's original Markdown"
makedepends=('git' 'glib2')
optdepends=('texlive-most: latex and PDF output support')
url="https://github.com/fletcher/peg-multimarkdown"
# Makefile for LaTeX files
# Original Makefile from http://www.math.psu.edu/elkin/math/497a/Makefile
# Please check http://www.acoustics.hut.fi/u/mairas/UltimateLatexMakefile
# for new versions.
# Copyright (c) 2005,2012 (in order of appearance):
# Matti Airas <Matti.Airas@hut.fi>
# Rainer Jung
@lahwaacz
lahwaacz / complex.cpp
Created March 24, 2013 21:27
operator+ overload example
class MyComplex
{
private:
double real, imag;
public:
MyComplex(){
real = 0;
imag = 0;
}
@lahwaacz
lahwaacz / fatcp.zsh
Last active December 14, 2015 22:18
zsh function to 'safe' copy to FAT32 partition
#! /bin/zsh
# Inspired by:
# http://askubuntu.com/questions/11634/how-can-i-substitute-colons-when-i-rsync-on-a-usb-key
autoload zargs zmv
fatcp() {
local src="$1"
local dest="$2"
@lahwaacz
lahwaacz / dim-abeceda-2.py
Created March 7, 2013 20:25
Pomocný program k řešení úlohy do DIM
#! /usr/bin/env python
"""
Zadání úlohy:
Kolik slov délky n lze sestavit v abecedě {A,B,C,D} za podmínky, že prvky A a B nesousedí
(ale A může sousedět s A, B může sousedět s B).
"""
import itertools
from math import sqrt
diff --git src/client.c src/client.c
index 7b9790e..db38e8b 100644
--- src/client.c
+++ src/client.c
@@ -1115,7 +1115,8 @@ client_winsize(struct client *c, struct geo *g)
c->wgeo.h = oh = tmp.h - (c->border + c->tbarw);
c->wgeo.w = ow = tmp.w - (c->border << 1);
- client_geo_hints(&c->wgeo, (int*)c->sizeh);
+ if(c->flags & CLIENT_FREE)
@lahwaacz
lahwaacz / PKGBUILD
Created March 4, 2013 22:33
Fixed PKGBUILD for cutechess-git (https://aur.archlinux.org/packages/cutechess-git/). Uses qmake-qt4 instead of qmake4, also first remove build directory - see /usr/share/pacman/PKGBUILD-git.proto
pkgname=cutechess-git
pkgver=20130304
pkgrel=1
pkgdesc="GUI and cli application for automating chess engine tournaments.(xboard & UCI)"
url="http://ajonsson.kapsi.fi/cutechess.html"
arch=('i686' 'x86_64')
license=('GPL3')
depends=('qt4')
makedepends=('git')
source=('cutechess.desktop')
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <map>
#include <utility>
#include <algorithm>
// trim from start
static inline std::string &ltrim(std::string &s) {
import itertools
languages = ["en", "cs", "eng", "cze"] # list of language codes
language_separators = [".", "-"] # list of separators (between file name and extension)
subtitle_extensions = ["srt", "sub"] # list of subtitle extensions
def rename_file(old, new):
p("rename %s to %s" % (old, new))
stat = os.stat(old)
os.rename(old, new)