Listing posts

Displaying posts 221 - 225 of 328 in total
Focaccia di Recco
mouse 1515 · person cloud · link
Last update
2018-09-24
2018
09-24
« — »

Ingredienti:

  • 500gr farina
  • 250ml acqua
  • 50ml olio evo
  • sale fino q.b.
  • sale grosso q.b.
  • 250gr stracchino e/o gorgonzola

Procedimento:

  1. Impastare farina, acqua, olio, sale e lasciar riposare mezz'ora
  2. Tirare la pasta con un mattarello e tagliarla in due parti uguali
  3. Riempire una metà col formaggio
  4. Usare l'altra metà come coperchio sigillando il formaggio nella pasta
  5. Spennellare d'olio la superficie e cospargerla con sale grosso
  6. Informare a 200 gradi per 20 minuti

~~~ * ~~~

CWP LFD emails
mouse 2489 · person cloud · link
Last update
2018-09-07
2018
09-07
«limit centos web panel (cpanel) lfd firewall (csf) notification emails»
  • stop emails for suspiciuos activities from trusted users/programs:
1
2
3
4
5
6
7
8
9
10
11
# /etc/csf/csf.pignore
# ignore users
user:tony
user:beppi
# ingrore programs
exe:/usr/bin/bash
exe:/usr/bin/mosh-server
exe:/usr/bin/redis-server
exe:/usr/bin/postgres
# ignore programs matching perl regex
pexe:/usr/local/rvm/rubies/ruby-.+/bin/ruby
  • stop blocked IPs emails:
1
2
3
# /etc/csf/csf.conf
LF_PERMBLOCK_ALERT = "0"
LF_EMAIL_ALERT = "0"
  • restart security services:
1
2
systemctl restart csf ; csf -r
systemctl restart lfd

~~~ * ~~~

Xorg window manager auto run custom start/stop scripts
mouse 1790 · person cloud · link
Last update
2018-09-06
2018
09-06
«window/display manager autostart
xfce, lightdm»

After reading Debian Xsession docs you can use this trick to automatically execute your scripts before starting your window manager and also after terminating it.

  • create a ~/.xsessionrc in where you update the PATH env var:
1
export PATH="$HOME/bin:$PATH"
  • create a wrapper with the same name of your window manager launcher, for example I use XFCE:
1
2
3
4
5
6
# $HOME/bin/xfce4-session
[ -f $HOME/bin/autostart-login.sh  ] && $HOME/bin/autostart-login.sh

/usr/bin/xfce4-session # run the real window manager

[ -f $HOME/bin/autostart-logout.sh  ] && $HOME/bin/autostart-logout.sh
  • login through your display manager (kdm, gdm, lightdm, ...) choosing the default session (Debian X session)

Using LightDM you can specify custom scripts on its settings in /etc/lightdm/lightdm.conf:

1
2
3
4
5
session-wrapper        # wrapper script to run session with
session-setup-script   # run as root on session start
session-cleanup-script # run as root on session exit
session-setup-script   # run as the user on session start
session-cleanup-script # run as the user on session exit

~~~ * ~~~

Backup symlinks, file permission, user and owner
mouse 1379 · person cloud · link
Last update
2018-09-05
2018
09-05
« — »
1
2
3
4
5
6
7
# symlinks
find . -type l | tar -czvf links.tgz -T -    # backup
tar -xzvf links.tgz                          # restore

# permissions, owner, group
getfacl -R . | gzip -c > perms.facl.gz # backup
zcat perms.facl.gz | setfacl --restore=-     # restore

Source: unix.stackexchange


~~~ * ~~~

Setup Kodi media center
mouse 2573 · person cloud · link
Last update
2018-09-03
2018
09-03
« — »
  • run sudo raspi-config then

    1. Advanced Options > Expand Filesystem (make room for contents)
    2. Advanced Options > Memory Split, set to 256MB
    3. Advanced Options > GL Driver, select G3 Legacy to use Broadcom drivers
    4. Interfacing Options > Camera, select Yes to enable the video codecs
  • sudo apt install kodi

  • start Kodi:

    • manually: Menu > Sound & Video > Kodi
    • autostart: echo "@kodi" >> ~/.config/lxsession/LXDE-pi/autostart
  • control it via your TV remote (use an HDMI-CEC cable), keyboard (arrows + enter key), joypad/joystick (sudo apt install kodi-peripheral-joystick), etc...


Source: makeuseof

Dedicated linux distros: OpenELEC, LibreELEC (a fork of OpenELEC), OSMC