Listing posts

Displaying posts 11 - 15 of 181 in total
Crostata di patate
mouse 655 · person cloud · link
Last update
2018-12-31
2018
12-31
« — »
Cover original

Ingredienti per la base:

  • 500gr di patate
  • 50gr di farina 00
  • 50gr di grana grattugiato
  • 30gr di burro fuso
  • 1x uova
  • sale e pepe

Ingredienti per la farcitura:

  • 50gr di pancetta a cubetti
  • 125gr di mozzarella
  • 1x scatoletta di funghi

Procedimento:

  1. Lessare le patate, e schiacciarle in una terrina.

  2. Unire uovo, grana, burro, sale, pepe e farina, amalgamando il tutto.

  3. Imburrare ed infarinare uno stampo per crostate da 20cm di diametro e versare l'impasto.

  4. Mettere la base in forno preriscaldato a 180° per circa 15/20 minuti.

  5. Quando la base sarà ben dorata, farcire con mozzarella, pancetta e funghi, e rimettere in forno per altri 10 minuti.


Fonte: Giallo Zafferano


~~~ * ~~~

Tasse su conto corrente e deposito
mouse 256 · person cloud · link
Last update
2018-12-19
2018
12-19
«imposta bollo conti, banca, banche, interessi, tassi»
  1. In ambo i rapporti si paga il 26% sugli interessi maturati.
  2. Importo del bollo statale:
    • Conto corrente: 34.20€ se saldo medio >= 5000€ altrimenti 0€
    • Conto deposito: 0.2% del saldo se giacenza media >= 5000€ altrimenti 1€
      (NB: con un tasso lordo di 0.28% si va a patta: 0.0028 * 0.74 - 0.002 =~ 0)

Fonte: ilportafoglio, confrontaconti


~~~ * ~~~

Linux on HiDPI attachment
mouse 302 · person cloud · link
Last update
2018-12-14
2018
12-14
«retina screen/monitor/display high resolution»

Here are my settings for my slimbook pro2 with a QHD+ 3200x1800 HiDPI display:

XFCE

Go to: Settings Manager > Appearance > Fonts > DPI = 192

X Server

Use Pitagora's theorem to determine screen size:

1
2
3
echo 'scale=5;sqrt(3200^2+1800^2)'   | bc  # 3671.51195 px
echo 'scale=5;(13.3/3671)*3200*25.4' | bc  #  294.23360 mm
echo 'scale=5;(13.3/3671)*1800*25.4' | bc  #  165.50640 mm

then tell them to Xorg:

1
2
3
4
5
# /etc/X11/xorg.conf -- generate one with: Xorg -configure
Section "Monitor"
  # check "xdpyinfo | grep -B 2 resolution" for curret DPI
  DisplaySize 294 165 # in millimeters
EndSection

You can also set the DPI manually with: xrandr --dpi 144.

GRUB

Download the terminus-32.pf21 (see attachment) and then:

1
2
echo 'GRUB_FONT="/boot/grub/terminus-32.pf2"' >> /etc/default/grub
update-grub

WINE

Run winecfg and change the dpi setting found in the Graphics tab.

Oracle Java >= 9

1
2
3
4
5
java \
  -Dsun.java2d.uiScale=2     \
  -Dsun.java2d.dpiaware=true \
  -Dsun.java2d.xrender=true  \
  -jar application.jar

Linux console

1
dpkg-reconfigure console-setup # and choose terminus 16x32

XTerm

Put in your ~/.Xresources:

1
2
3
4
! xterm ttf font (so it scales on hidpi displays)
XTerm*renderFont: true
XTerm*faceName: Monospace
XTerm*faceSize: 18

then load it via xrdb -merge ~/.Xresources.


Multiple displays

To have a non-HiDPI monitor (on DP1) right of an internal HiDPI display (eDP1), one could run:

  • extending:
1
xrandr --output eDP-1 --auto --output DP-1 --auto --scale 2x2 --right-of eDP-1

or use this automated script (see attachment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# https://gist.github.com/wvengen/178642bbc8236c1bdb67
#
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
#                  https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319

EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`

ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
ext_h=`xrandr | sed 's/^'"${EXT}"' [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
int_w=`xrandr | sed 's/^'"${INT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
off_w=`echo $(( ($int_w-$ext_w)/2 )) | sed 's/^-//'`

xrandr --output "${INT}" --auto --pos ${off_w}x${ext_h} --scale 1x1 --output "${EXT}" --auto --scale 2x2 --pos 0x0 --right-of "${INT}"
  • panning:
1
2
3
4
5
6
7
# panning with AxB HiDPI, CxD external, ExF scale factor, external on the right:
xrandr --output eDP-1 --auto --output HDMI-1 --auto \
  --panning [C*E]x[D*F]+[A]+0 --scale [E]x[F] --right-of eDP-1

# example with 4k (3840x2160) + FullHD (1920x1080) on the right
xrandr --output eDP-1 --auto --output DP-1 --auto \
  --panning 3840x2160+3840+0 --scale 2x2 --right-of eDP-1
  • manual positioning:
1
2
3
4
5
6
7
8
9
# AxB HiDPI, CxD external, [ExF] scaling factor, external above:
xrandr --output eDP-1 --auto --pos 0x(DxF) \
  --output HDMI-1 --auto --scale [E]x[F] --pos 0x0 \
  --fb [max(A, (C*E))]x[B+(D*F)]

# example with 2560x1440 + 1920x1080 above
xrandr --output eDP-1 --auto --pos 0x1458 \
  --output HDMI-1 --scale 1.35x1.35 --auto --pos 0x0 \
  --fb 2592x2898

and adjust the sharpness parameter on your monitor settings to adjust the blur level introduced with scaling.


Source: Archlinux Wiki


~~~ * ~~~

Show .torrent contents
mouse 13 · person cloud · link
Last update
2018-12-14
2018
12-14
« — »
1
2
3
apt-get install bittorrent

btshowmetainfo file.torrent

~~~ * ~~~

Convert audio/video file to MP3
mouse 271 · person cloud · link
Last update
2018-12-12
2018
12-12
«ffmpeg flac m4a mp3»

FFmpeg convert-all

Install ffmpeg:

1
2
3
4
5
6
# debian 8 jessie
apt-get install libav-tools
alias ffmpeg=avconv # put this in your ~/.bashrc

# debian 9 stretch
apt-get install ffmpeg

or just download a static build from the nice John Van Sickle (choose armhf-32bit for the raspberry pi).

Then use it to convert all your files:

1
2
3
for f in *.flac , *.m4a , *.ogg ; do
  ffmpeg -i "$f" -ab 320k "${f%.m4a}.mp3"
done

Note: In case of Too many packets buffered for output stream error use -max_muxing_queue_size option with a higher number (start at 1000).

FLAC to MP3 via custom encoder

1
flac -c -d in.flac | lame -m s -h -b 256 - out.mp3