Skip to content

Instantly share code, notes, and snippets.

View zburgermeiszter's full-sized avatar
👨‍💻
Available for Remote DevOps Engineer positions

Zoltan Burgermeiszter zburgermeiszter

👨‍💻
Available for Remote DevOps Engineer positions
View GitHub Profile
@zburgermeiszter
zburgermeiszter / Recursively generate MD5 checksums.txt
Created January 29, 2015 10:41
Recursively generate MD5 checksums
Recursively generate MD5 checksums
Posted 10-26-2011 at 10:53 AM by Garda
Tags find, md5, md5sum, xargs
I wanted to generate MD5 checksums of a whole bunch of files in a directory. It turns out that this is not as straightforward as it should be. IMO it should be completed with: md5sum -br *
Unfortunately it was not as straightforward. I found this blog entry after searching for a while and adapted this to what I needed. To generate checksums, I used the following:
Code:
find . -type f -print0 | xargs -0 md5sum -b
(Note: for the above to work, "cd" to the top level directiory, or use "find /home/username/folder/" instead of "find .")
@zburgermeiszter
zburgermeiszter / .gitconfig
Created January 30, 2015 09:55
.gitconfig
[core]
excludesfile = /home/user/git/.gitignore_global
autocrlf = input
[alias]
ls = log -30 --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short
c = commit -am
co = checkout
b = branch
s = status
d = diff
@zburgermeiszter
zburgermeiszter / Sending empty arrays with jquery to Symfony.js
Last active August 29, 2015 14:24
Sending empty arrays with jquery to Symfony
$.ajax({
url:postURL,
type:"POST",
data:JSON.stringify(data),
contentType:"application/json; charset=utf-8",
dataType:"json"
})
@zburgermeiszter
zburgermeiszter / overload.php
Last active August 29, 2015 14:27
Emulating method overloading with different signature.
<?php
// Link: https://ideone.com/JBQDNw
// PHP 5.4 required!
trait Overload {
public function overloadMe() {
$caller = debug_backtrace(false , 2)[1];
$function = $caller['function'];
@zburgermeiszter
zburgermeiszter / ssh-tricks.sh
Created October 1, 2015 09:44
Linux SSH tricks
# stream file throttled to 1M/s
ssh [user]@[remote-host] 'cat /root/random.bin' | cstream -t 1M > x.bin
@zburgermeiszter
zburgermeiszter / double-speed.sh
Created December 20, 2015 11:53
Speed up all mp3 in a folder
for file in *; do ffmpeg -i "$file" -filter:a "atempo=2.0" -c:a libmp3lame "$file"-2.mp3; done
@zburgermeiszter
zburgermeiszter / find.sh
Created January 26, 2016 15:15
find text in files
egrep -ir --include=*.{php,html,js} "(document.cookie|setcookie)" .
@zburgermeiszter
zburgermeiszter / Makefile
Created March 29, 2016 08:54
Docker composer with makefile
PWD=$(shell pwd)
default: build-composer install-composer docker-compose
kill: docker-compose-down
build-composer:
docker build -t=queuestack_composer composer
install-composer:
@zburgermeiszter
zburgermeiszter / wait.sh
Created March 30, 2016 14:56
Waiting until couchDB starts
while ! nc -vz localhost 5984; do sleep 1; done
NAME