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
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#define ER (6371007.2) | |
#define RAD(degrees) (degrees * (M_PI / 180)) | |
main(int argc, char **argv) | |
{ | |
double dLa1, dLo1, dLa2, dLo2; |
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
#!/bin/bash | |
baseurl="http://is.gd/create.php?format=simple" | |
for URL in "$@"; do | |
curl -s --data-urlencode "url=$URL" "$baseurl" | xclip -selection c | |
done | |
exit $? |
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
find . -regex ".*\.\(inf\|exe\|bat\)" -exec sh -c 'mv "$0" "${0%}.SUSPICIOUS"' {} \; |
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
alias supplements='[ $[ $((10#`date +%j`)) % 2 ] -eq 0 ] && echo "Take E" || echo "Take E & D3"' |
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
# take snapshot with ffmpeg | |
ffmpeg -ss 00:01:22 -t 1 -i <inputfile> -f mjpeg <outputfile> | |
# read configs | |
sed '/ *#/d; /^ *$/d' apache2 | |
# distance and time from my rundiary, last seven day - http://yordan.radunchev.com/running/rundiary | |
curl -s http://yordan.radunchev.com/running/rundiary | \ | |
awk -F"," 'NR>2&&$NR<10{km+=$2; split($3, t, ":"); sum+=60*60*t[1]+60*t[2]+t[3]}END{print km/1000, strftime("%T",sum,1)}' |
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
# mv /usr/bin/curl /usr/bin/curl.bin | |
# cat > /usr/bin/curl | |
#!/bin/bash | |
curl.bin -k $* | |
[CTRL+D] | |
# chmod 755 /usr/bin/curl | |
Fire YaST2, activate SLES, then: |
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
#!/bin/bash | |
PDF=$1 | |
convert ${PDF} pages.png | |
convert pages-* -append ${PDF}.jpg | |
rm pages-* |
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
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
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
10:11:19 yradunchev:~ $ while :;do clear;echo -e 'beer\nwine\nwhiskey\nvinegar' | sort -R | head -1 | figlet -tc; read -t .01 -n 1 && read -n 1; done |
OlderNewer