LED Library

Comincio a prenderci gusto… ecco un’altra libreria per comandare un led su Arduino. La mia versione permette di far lampeggiare un led oppure di accenderlo e spegnerlo lentamente con un effetto respiro in modalità non bloccante.

Trovate sorgenti ed esempi sul mio GitHub. Commenti e contributi sono ben accetti!

Terminale migliorato in Mac OS X

Un piccolo consiglio per migliorare il Terminale in Mac OS X. Prima di proseguire vi prego di notare che non ho scritto “macOS” di proposito in quanto questo trick è consigliato per chi usa bash come interprete dei comandi nelle versioni meno recenti del sistema operativo con la mela.

Innanzitutto assicuriamoci che esista il file ~/.bash_profile nella propria home e che contenga quanto segue:

if [ -r ~/.bashrc ]; then
source ~/.bashrc
fi

Quindi andiamo a personalizzare il prompt dei comandi editando il file ~/.bashrc e inserendo quanto segue:

export PS1="[\033[36m]\u[\033[m]@[\033[32m]\h:[\033[33;1m]\w[\033[m]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
alias ll='ls -lah'

Sulla rete si trovano molti esempi di personalizazzione. Queste sono le mie impostazioni preferite.

Crostino nero toscano al vinsanto

Questo post è veramente off-topic dal momento che in questo blog non tratto di cucina, ma volevo condividere la ricetta per preparare l’impasto del crostino nero toscano, nella versione con il vinsanto, scritta di suo pugno da mia mamma.

La ricetta scritta di suo pugno da mia mamma

IPv4 CIDR chart

Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP routing. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous addressing architecture of classful network design in the Internet. Its goal was to slow the growth of routing tables on routers across the Internet, and to help slow the rapid exhaustion of IPv4 addresses.

IP addresses are described as consisting of two groups of bits in the address: the most significant bits are the network prefix, which identifies a whole network or subnet, and the least significant set forms the host identifier, which specifies a particular interface of a host on that network. This division is used as the basis of traffic routing between IP networks and for address allocation policies.