If like me you do not have a fixed IP addres, you may have to update a DNS record.
And if you use a VPN, you want to update the DNS record with your real IP address.
Here is a bootscript to do that in Python.
Continue reading »If like me you do not have a fixed IP addres, you may have to update a DNS record.
And if you use a VPN, you want to update the DNS record with your real IP address.
Here is a bootscript to do that in Python.
Continue reading »The scality’s RING product is a distributed storage solution, which manages different replication and erasure coding security. – https://www.scality.com/
A RING keyspace is a circle starting at 00, ending at FF.
in reality, the numbers are not just 2 character long but 40 characters.
A keyspace is composed of node keyranges.
A keyrange is a space between a key on the keyspace, and the predecessor key.
I have several backups of my old mobile phones, with a lot of pictures taken.
When I wanted to categorize them, it appeared that there was duplicated pictures (really? ;))
so a little script after that, I could found all duplicated files et choose which of them to delete.
This script will not touch your files but displays all duplicated found files both in your terminal and in a csv file.
feel free to open it with your preferred sheet program
FYI: The analysis is based on the size and checksum of the files, not on the date nor filename.
the result is:
$ ./find_dups.sh -dir /data/photos\ -\ images/ find duplicate files size md5sum duplicated files size isolate duplicated files found print the result 53b69ddf18c82f222046e8f616955bc6;;/data/photos - images/photos classées/Annee_2011/miaou/IMAG0462.jpg;/data/photos - images/photos classées/Annee_2012/miaou/IMAG0462.jpg the result can be found in: '/tmp/find_dups.sh/04-result.csv'
On m’a demandé comment copier sans écraser la destination si elle existe.
l’environnement est restreint, pas de rsync et doit tenir dans une ligne.
pas le temps de tester si le fichier existe, ce doit être rapide.
la solution est facile:
# yes |sed 's/y/n/' | cp -i source destination
Here is my custom PS1 for GIT.
You can see if you are in a GIT tree, the current branch and the status of the branch (the + or the – before the branch)
The special command to obtain this kind of prompt is
Works on Bash only
cidr2dec() { cidr=$1 totalmask= ; bits= for ((i=$cidr; $i>0; i--)); do bits="${bits}1" ; done for ((i=$((32 - $cidr)); $i>0; i--)); do bits="${bits}0" ; done for i in 1 9 17 25; do bitmask=$(echo $bits |cut -c${i}-$(($i + 7))) totalmask=${totalmask}$(echo 'obase=10; ibase=2;' $bitmask |bc). done echo ${totalmask%%.} }
$ for i in 16 24 26 27 32 ; do cidr2dec $i ; done 255.255.0.0 255.255.255.0 255.255.255.192 255.255.255.224 255.255.255.255
English is not my natural language, i accept all your corrections and will modify the texts as soon as possible.
Update 7th October 2012 : adding the power off function for the remote.
Xtreamer ultra is an HTPC (mini computer) using GNU/Linux operating system, providing a wonderful media center.
shipped with Ubuntu 10.10 (maverick merkaat code name). this release is no more supported by the development company (Canonical) so we can not have updates anymore.
I’ve seen a lot of users searching how to make Xtreamer work on Ubuntu 12.04, I hope this guide will help some people.
Xtreamer Ultra & Xtreamer Ultra2 are approximatively the same product as you can see at : www.xtreamer.net/ultra/ & www.xtreamer.net/ultra2/
I only have Xtreamer Ultra so I can’t test these configurations on Ultra2
comment gérer les messages d’absence automatique sous postfix et postfixadmin, quand on utilise des utilisateurs virtuels.
suivez le lien : http://www.isalo.org/wiki.debian-fr/index.php?title=Roundcube_%2B_Vacation_-_Notification_d’absence
pour supprimer des répertoires vides, on a trois solutions.
un première qui est « propre » mais ne fonctionne qu’avec un find GNU:
$ find /tmp -type d -empty
je vous laisse rajouter le « rm » qui va avec.
une seconde qui est très rapide mais très sale aussi.
Continue reading »
Un tas de développeurs ne regardent pas plus loin que leur nez et ne pensent pas « dans le temps ».
quand on écrit un programme, il ne faut pas « juste » prendre en compte l’existant mais aussi ce qui pourrait exister, il faut toujours cloisonner les choix d’action possible d’un script ou d’un programme.
j’ai encore eu un cas cette semaine, ou un de nos serveurs de mail va changer, son adresse IP aussi. j’ai donc voulu vérifier par acquis de conscience si son adresse n’était pas référencée/utilisée dans des scripts. un seul mot : effarant!
Continue reading »