Category Archives: bash

Adafruit’s TFT + raspberrypi + camera

I finally managed to have a working camera + touchscreen using a raspberry pi
All I did was assembling the hardware and some copy/paste to have a working configuration.

Youtube video of the boot

put this contraption and the telescope together 😉

unboxing the TFT
preparing the stuff
bad soldering
bad soldering

console on TFT

lxde on r-pi
lxde on r-pi


to build
to make X start as youwant to
to make the camera work as you’d expect

bash inverse wildcards

If you want to ls all BUT the .sh files:

ls !(*.sh)


tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls *.sh
tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls !(*.sh)
file4ShdNk  filea6uHLm  fileB4sRgx  filecdQQzj  fileLYvbHv  fileo4TKHj  fileoKaCVj  fileSxbv0v  fileTlphlz  fileYLJ43w
tatico@tortuguita:~/codigo/python/files_keeper/random_files$ ls
file4ShdNk  fileB4sRgx  fileLYvbHv  fileoKaCVj  fileTlphlz
filea6uHLm  filecdQQzj  fileo4TKHj  fileSxbv0v  fileYLJ43w

raspberrypi + lots of external USB drives

I used two different USB hubs, one from The Pi Hut and another (sexier) one from pimoroni plugged to each of the USB ports of a rapsberry pi model B.
I was able to plug 7 500G hard drives: 3 to the 7 port USB Hub (which also powers the Raspberry Pi) and 4 to the Pi Hub. This gave me about 3.5 Gb of storage.
Don’t expect high speed data transfers 😉

    • software
      • blkid

If, for instance, you reboot the raspberry, disk may “appear” in a different order at boot, sdX1 will not be the same disk it was prior to the reboot, this will fuck mess your mount points. Use blkid to get the UUID for each device (see example). Use it as root.

      • fstab

The options defaults,user allow any user to mount the disk and gives read/write access.

    • hardware
      • Pi Hub
      • 7 port Hub
      • USB external hard drives
    • code
 blikd example:
/dev/sda1: LABEL="My Passport" UUID="EA6854D268549F5F" TYPE="ntfs"
/dev/sdb1: LABEL="My Passport" UUID="9C64D17064D14DA0" TYPE="ntfs"
/dev/sdc1: UUID="788889661CDB8DC8" TYPE="ntfs"
/dev/sdd1: LABEL="KINGSTON" UUID="423A-9647" TYPE="vfat"
/dev/sr0: LABEL="WD SmartWare" TYPE="udf"
 fstab example:

UUID=9C64D17064D14DA0 	/media/wdblack1 auto	defaults,user 	0	0
UUID=EA6854D268549F5F	/media/wdblack2	auto	defaults,user	0	0
UUID=788889661CDB8DC8	/media/wdred	auto	defaults,user	0	0


pi usb hub
pi usb hub
pi usb hub unboxing
pi usb hub unboxing
pi hut usb hub
pi hut usb hub

comment savoir qui est connecté sur ma freebox + bonus

Pour connaitre les IP et adresses mac des appareils qui sont connectés sur une Freebox, il suffit de faire


et avec un petit coup de grep, ceux qui connaissent pourront avoir les infos précises.
Pour savoir à qui appartiens une mac adresse, voici un lien: coffer ou pour les bricoleurs, un petit script qui fais pareil: github


Pour avoir la playlist qui marche bien avec VLC après:


setting up a DNS server for my local network

root@raspberrypi-1:/home/pi# cat  /etc/powerdns/bind/
$ORIGIN home     ; base for unqualified names
$TTL 1h                 ; default time-to-live
@                       IN      SOA ns.home hostmaster.home (
                                1; serial
                                1d; refresh
                                2h; retry
                                4w; expire
                                1h; minimum time-to-live
                        IN      NS      ns
                        IN      A
ns                      IN      A
raspberrypi-1           IN      A
raspberrypi-2           IN      A
root@raspberrypi-1:/home/pi# cat /etc/powerdns/bindbackend.conf 
zone "home" {
        type master;
        file "/etc/powerdns/bind/";
        allow-update { none; };

Source here