Skip to content

Instantly share code, notes, and snippets.

View romuloceccon's full-sized avatar

Rômulo Ceccon romuloceccon

  • Frankfurt am Main, Deutschland
View GitHub Profile
@romuloceccon
romuloceccon / git-current-lines-by-author.sh
Last active April 30, 2018 09:58
git stats by author
git ls-files -z | xargs -0n1 git blame -e | perl -e 'while (<>) { s/^.*?<(.*?)>.*$/\1/; print $_; }' | sort -f | uniq -c | sort -n
@romuloceccon
romuloceccon / google-maps.txt
Last active February 19, 2016 21:36
Google maps urls
Terrain + roads
https://www.google.com.br/maps/vt?lyrs=p&x=2569&y=4639&z=13&scale=1
https://www.google.com.br/maps/vt?lyrs=p&x=5139&y=9279&z=14&scale=1
https://www.google.com.br/maps/vt?lyrs=p&x=10278&y=18558&z=15&scale=1
Birdeye + roads
https://www.google.com.br/maps/vt?lyrs=y&x=2569&y=4639&z=13&scale=1
https://www.google.com.br/maps/vt?lyrs=y&x=5139&y=9279&z=14&scale=1
@romuloceccon
romuloceccon / start-ssh-agent.sh
Created May 18, 2015 13:25
Starts ssh-agent from bashrc, preventing multiple instances between sessions
#! /bin/bash
AGENTPID=$HOME/.ssh/agent.pid
AUTHSOCK=$HOME/.ssh/auth.sock
if [[ -z ${SSH_AUTH_SOCK+x} ]]
then
if [[ ! -e $AUTHSOCK || ! -e $(cat $AUTHSOCK) ]]
then
eval $(ssh-agent -s)
@romuloceccon
romuloceccon / pybackup.cmd
Last active August 29, 2015 14:20
Backup utility with replication for Windows
DEL /q ..\tmp\*.*
"C:\Program Files\Python 2.7\python.exe" pybackup.py >> ..\logs\pybackup.log 2>&1
@romuloceccon
romuloceccon / md5check.cmd
Last active August 29, 2015 14:20
Check md5 against a given file list (Windows)
rd /q /s md5check_temp
xcopy /e /i /h X:\ md5check_temp
md5deep64.exe -lrX md5sum.txt md5check_temp\
@romuloceccon
romuloceccon / avconv_examples.sh
Last active November 12, 2016 16:39
avconv command lines to reduce video size
# https://trac.ffmpeg.org/wiki/Encode/H.264
# https://trac.ffmpeg.org/wiki/Encode/AAC
# -map 0 -c copy: copy all remaining streams
# -pix_fmt yuv420p: be compatible with most players
# high quality video, high quality audio
avconv -i input.mov -map 0 -c copy -c:v libx264 -preset veryslow -pix_fmt yuv420p -crf 17 -c:a libfdk_aac -vbr 4 output.mov
# high quality *compatible* full-hd video, high quality audio
@romuloceccon
romuloceccon / .gitignore
Last active April 3, 2025 19:04
A .gitignore file for tracking the /etc directory with git
*~
*-old
*.cache
*.dpkg-dist
*.dpkg-bak
/*-
/*.org
/adjtime
/.pwd.lock
/mtab
#!/bin/bash
IFS=$'\n'
for L in $(git status --porcelain $1); do
if [[ $L =~ ^\ M\ (.*)$ || $L =~ ^\ T\ (.*)$ || $L =~ ^\?\?\ (.*)$ ]] ; then
git add ${BASH_REMATCH[1]}
>&2 echo added ${BASH_REMATCH[1]}
elif [[ $L =~ ^\ D\ (.*)$ ]] ; then
git rm ${BASH_REMATCH[1]}
@romuloceccon
romuloceccon / google_earth.xml
Last active May 25, 2016 09:08
Custom "Google Earth" source for Mobile Atlas Creator 1.9.16. Save as *.xml in /mapsources.
<customMapSource>
<name>Google Earth</name>
<minZoom>0</minZoom>
<maxZoom>19</maxZoom>
<tileType>JPG</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>https://khms{$serverpart}.google.com/kh/v=154&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
<serverParts>0 1 2 3</serverParts>
</customMapSource>
@romuloceccon
romuloceccon / google_maps.xml
Last active October 4, 2021 19:32 — forked from cmtsij/google.xml
Custom "Google Maps" source (pt-BR) for Mobile Atlas Creator 1.9.16. Save as *.xml in /mapsources.
<customMapSource>
<name>Google Maps</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://mt{$serverpart}.google.com/vt/lyrs=m@176103410&amp;hl=pt-BR&amp;x={$x}&amp;y={$y}&amp;z={$z}&amp;s=Galileo&amp;scale=1</url>
<serverParts>0 1 2 3</serverParts>
</customMapSource>