Skip to content

Instantly share code, notes, and snippets.

@daniambrosio
daniambrosio / setdate.sh
Last active November 21, 2022 19:14
Bash Command Line Script to set date and time of files (photos) based on their filename
#!/bin/bash
# do not forget to run chmod 755 on this script
for i in *.mp4; do
#file format is: YYYYmmdd_hhmmss
echo "$i"
day="${i:6:2}"
month="${i:4:2}"
year="${i:0:4}"
@daniambrosio
daniambrosio / gist:cfcec59c912c8ee3b32ac14f49eba300
Created April 4, 2021 01:03
Bash script to generate md5 of all files in a folder to compare
# This command will generate the md5 for every file in a folder. The result will be the file path and name
# followed by checksum for every file
find 2004PhotosVideos -type f -exec md5 -r {} \; | sort | tee pv.txt
# This command will generate the md5 for every file in a folder. The result will be the checksum for every file
# (no file names included)
find 2004PhotosVideos -type f -exec md5 -q {} \; | sort | tee pv-q.txt
@daniambrosio
daniambrosio / devise.pt-BR.yml
Last active October 2, 2016 01:06
pt-BR-Translation-for-Devise-3.2.2
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
# Este arquivo deve ser colocado em config/locales/devise.pt-BR.yml
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso."
send_instructions: "Você receberá um email para confirmar sua conta em alguns minutis."
send_paranoid_instructions: "Caso seu endereço de email já exista em nossa base, você receberá um email com instruções sobre como ativar sua conta."
failure:
@daniambrosio
daniambrosio / devise.pt-BR.yml
Created October 30, 2011 19:43
pt-BR-Translation-for-Devise-1.4.7
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
# Este arquivo deve ser colocado em config/locales/devise.pt-BR.yml
pt-BR:
errors:
messages:
expired: "expirou, por favor solicite um novo"
not_found: "não encontrado"
already_confirmed: "já foi confirmado, por favor tente fazer login"
not_locked: "não estava bloqueado"