This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url:postURL, | |
type:"POST", | |
data:JSON.stringify(data), | |
contentType:"application/json; charset=utf-8", | |
dataType:"json" | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Link: https://ideone.com/JBQDNw | |
// PHP 5.4 required! | |
trait Overload { | |
public function overloadMe() { | |
$caller = debug_backtrace(false , 2)[1]; | |
$function = $caller['function']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stream file throttled to 1M/s | |
ssh [user]@[remote-host] 'cat /root/random.bin' | cstream -t 1M > x.bin | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *; do ffmpeg -i "$file" -filter:a "atempo=2.0" -c:a libmp3lame "$file"-2.mp3; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
egrep -ir --include=*.{php,html,js} "(document.cookie|setcookie)" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PWD=$(shell pwd) | |
default: build-composer install-composer docker-compose | |
kill: docker-compose-down | |
build-composer: | |
docker build -t=queuestack_composer composer | |
install-composer: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while ! nc -vz localhost 5984; do sleep 1; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME |