Skip to content

Instantly share code, notes, and snippets.

View beny's full-sized avatar
:octocat:
🆙 and 🏃‍♂️

Ondra Beneš beny

:octocat:
🆙 and 🏃‍♂️
View GitHub Profile
@beny
beny / convertEncoding.sh
Created October 30, 2011 16:51
convert LaTeX thesis template to unicode
#!/bin/bash
FROM=iso-8859-2
TO=UTF-8
FILES=("desky.tex" "fitthesis.cls" "literatura.bib" "obsah.tex" "prilohy.tex" "projekt.tex")
for i in "${FILES[@]}"
do
iconv -f $FROM -t $TO $i > tmp
sed 's/latin2/utf8/g' tmp > tmp2
@beny
beny / gist:929169
Created April 19, 2011 18:27
testovaci skript pro projekt do PRL cislo 3
#!/usr/bin/ruby
require "benchmark"
DEBUG = false
# kontrola zda je mocnina dvojky
def is_pow?(x)
true if (x != 0) && ((x & (x - 1)) == 0);
end
@beny
beny / bash_profile
Last active November 12, 2024 11:58
Bash config
# enviroment variables
export BASH_SILENCE_DEPRECATION_WARNING=1
export CLICOLOR=1
export EDITOR='vim'
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export PATH=/usr/local/bin:$PATH:$HOME/.bin
export MATCH_PASSWORD=Ab22112011
# beware if not escaping these values right, it will broke the output
@beny
beny / gist:755442
Created December 26, 2010 14:21
vim config
syntax on
set number
set smarttab
set paste
filetype plugin on
set shiftwidth=4
colorscheme desert
set fileencodings=utf-8,cp1250,iso8859-2