Listing posts

Displaying posts 6 - 10 of 181 in total
Convert DVD subtitles from VOBsub to SRT
mouse 18 · person cloud · link
Last update
2019-01-10
2019
01-10
«converting dvd subs from vob to srt»
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# install tools
apt-get install mplayer mencoder vobsub2srt tesseract-ocr-ita

# detect subtitle ID from the main track
mplayer -dvd-device dvd.iso -identify 'dvd://2'

# extract DVD subtitles to VOBsub file
mencoder -nosound -ovc copy -dvd-device dvd.iso -aspect 16:9 \
  -o /dev/null -vobsubout subtitles -vobsuboutindex 0 -sid 0 \
  'dvd://2'

# convert VOBsub to SRT format
vobsub2srt --lang it subtitles

# check spelling with libreoffice
soffice subtitles.srt

~~~ * ~~~

Setup RetroPie gaming station attachment
mouse 451 · person cloud · link
Last update
2019-01-10
2019
01-10
«raspi»

Setting up RetroPie

  • Check your locale settings with the locale command:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pi$ locale | sort
LANG=en_GB.UTF-8
LANGUAGE=
LC_ADDRESS="en_GB.UTF-8"
LC_ALL=
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"

and set missing values in /etc/environment:

1
2
LANGUAGE="en_GB:en"
LC_ALL="en_GB.UTF-8"
  • Login as pi, clone the setup script and run it:
1
2
3
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git ~/RetroPie-Setup
cd ~/RetroPie-Setup
sudo ./retropie_setup.sh

do a Basic Install and disable the splashscreen in Configuration to avoid a suddend switch to VT1 after the graphical login (see reddit Q/A and retropie faq).

  • Disable screenblanker by appending consoleblank=0 to kernel parameters in /boot/cmdline.txt.

  • Set memory split for the video card to at least 128MB via raspi-config.

  • Create a shortcut to launch EmulationStation from the Pixel desktop:

1
2
3
4
5
6
7
8
9
# ~/.local/share/applications/retropie.desktop
[Desktop Entry]
Type=Application
Name=RetroPie
Comment=Retro video game emulators
Exec=/home/pi/bin/start-retropie
Icon=/path/to/retropie.png
Terminal=false
Categories=Game;Application;

create the /home/pi/bin/start-retropie:

1
2
3
4
5
#!/usr/bin/sudo bash
systemctl stop lightdm # release the video card
sleep 1  # give lightdm the time to stop itself
chvt  1  # switch to the 1st foreground virtual terminal
/path/to/ttyecho -n /dev/tty1 "emulationstation ; sudo systemctl start lightdm"

then compile and install the ttyecho program (see attachment).

Make sure you have enabled console autologin on VT1 via raspi-config.

  • Optionally you can configure runcommand to show a game splashscreen by enabling Launch Menu Art in its configuration, and even set a system default image by installing the experimental package launchingimages.

  • Show scanlines:

    • Configuration > Retroarch > Enable shaders and overlays
    • Configuration > Configedit > Configure basic libretro emulator options > Configure default options for all libretro emulators > Video shader enable and Video shader file > crt-pi.glslp
  • When configuring controller you can skip buttons you don't have by simply long press a button.

  • Setup video mode:

Set your tv/monitor format by setting sdtv_mode=2 (PAL) in /boot/config.txt.

Set the low resolution VGA mode CEA-1 by putting in /opt/retropie/configs/all/videomodes.cfg:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
mame4all = "CEA-1"
mupen64plus = "CEA-1"
pifba = "CEA-1"
lr-beetle-ngp = "CEA-1"
lr-beetle-pce-fast = "CEA-1"
lr-beetle-supergrafx = "CEA-1"
lr-caprice32 = "CEA-1"
lr-fbalpha = "CEA-1"
lr-fceumm = "CEA-1"
lr-fuse = "CEA-1"
lr-gambatte = "CEA-1"
lr-genesis-plus-gx = "CEA-1"
lr-gpsp = "CEA-1"
lr-handy = "CEA-1"
lr-mame2000 = "CEA-1"
lr-mame2003 = "CEA-1"
lr-mgba = "CEA-1"
lr-mupen64plus = "CEA-1"
lr-nestopia = "CEA-1"
lr-pcsx-rearmed = "CEA-1"
lr-picodrive = "CEA-1"
lr-prosystem = "CEA-1"
lr-quicknes = "CEA-1"
lr-snes9x2002 = "CEA-1"
lr-snes9x2005 = "CEA-1"
lr-snes9x2010 = "CEA-1"
lr-stella = "CEA-1"
lr-vba-next = "CEA-1"
lr-vecx = "CEA-1"

in this manner your TV will do the upscaling work and the emulators will run faster.

Upgrading RetroPie version

1
2
3
cd ~/RetroPie-Setup
git pull
sudo ./retropie_setup.sh # and choose "Update" from the menu

When the upgrade is finished make sure the splashscreen is disabled.


Source: RetroPie HP, wired, Pixel & RetroPie, RP icon, TTYecho, change linux vt/tty

Retropie docs: Wiki, Manual install, RA hotkeys, Controller setup, Supported systems, Arcade HP & MAME info

PlayStation 1: convert ISO to PBP format on windows and linux -- see gtk-popstation and psx2psp/popstation by Ivan Vega

MAME resources: Snapshots and DAT/XML files, ES gamelist.xml script

Game systems DAT/XML files: HyperList


TODO/WIP:


~~~ * ~~~

Esercizi per stretching/allungamento schiena attachment
mouse 13 · person cloud · link
Last update
2019-01-09
2019
01-09
«lombari
parte bassa schiena»


  • Rispettare riscaldamento e respirazione, evitare movimenti bruschi ed eccessivi allungamenti.
  • Si alleviano le tensioni e migliora l'elasticit√† della muscolatura paravertebrale e lombare.
  • Vanno bene anche quando l'infiammazione ed il dolore non sono ancora passati del tutto.
descrizione esempio
3 volte, per 20 secondi
5 volte, incurvare verso l'alto espirando tutta l'aria, ritornare inspiarando
5 volte, gambe divaricate, piegarsi espirando, ritornare inspiarando
glutei sui talloni, allungarsi espirando, ritornare inspiarando. ripetere allungando a dx e sx.
per 20 secondi, 1 volta per gamba
per 15-20 secondi, 1 volta per gamba
per 20-30 secondi, 1 volta per lato

Fonte: my-personaltrainer.it


~~~ * ~~~

rclone upload/download split/restore large file
mouse 111 · person cloud · link
Last update
2019-01-08
2019
01-08
«upload/backup a big file to your online drive with auto split/concatenation»
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env ruby

require 'shellwords'

RCLONE_OPTS = ""

def print_usage_and_exit
  progr = File.basename __FILE__
  puts "USO: #{progr} <service_name> <ul|dl|rm|ls> <src_file|-> [<dst_file|->] [chunk_size_MB]"
  puts "  splits/concatenate and upload/download a file via rclone"
  puts "  eg: tar -cf - / | pigz | #{progr} gdrive ul - /backup/vps/root.tgz"
  puts "  eg: #{progr} gdrive dl /backup/vps/root.tgz - | tar -xzf - -C /"
  puts "  eg: #{progr} gdrive ul homes.tgz /backup/vps/homes.tgz"
  puts "  eg: #{progr} gdrive dl /backup/vps/homes.tgz homes.tgz"
  puts "  eg: #{progr} gdrive rm /backup/vps/homes.tgz"
  puts "  eg: #{progr} gdrive ls /backup/vps"
  exit 1
end

# temp files cleanup on exit
$temp_files = []
def remove_temp_files; $temp_files.each{|f| File.unlink(f) rescue nil }; end
Signal.trap('INT' ){ remove_temp_files; exit }
at_exit{ remove_temp_files }

# sanitize parameters
srv_name, action, src_file, dst_file, chunk_size = ARGV
srv_name   = srv_name.to_s.strip
src_file   = src_file.to_s.strip
dst_file   = dst_file.to_s.strip
chunk_size = 1024 * 1024 * (chunk_size.to_i > 0 ? chunk_size.to_i : 100) # default 100MB

case action
when 'rm'
  print_usage_and_exit if ARGV.size < 3

  puts "deleting files..."
  system %Q|rclone #{RCLONE_OPTS} --include #{src_file.shellescape}.rc\\* delete #{srv_name}:|
when 'ls'
  print_usage_and_exit if ARGV.size < 3

  puts "listing files..."
  files = `rclone #{RCLONE_OPTS} lsf #{srv_name}:#{src_file.shellescape}`.split("\n")
  puts files.map{|i| i =~ /\.rc[0-9]{4}/ ? "*#{i[0..-8]}" : " #{i}"}.sort.uniq
when 'ul'
  print_usage_and_exit if ARGV.size < 4

  puts "deleting any eventual old files..."
  system %Q|rclone #{RCLONE_OPTS} --include #{dst_file.shellescape}.rc\\* delete #{srv_name}:|

  puts "split and upload of [#{src_file}]:"
  fd_src = src_file == '-' ? STDIN : File.open(src_file)
  chunk_idx = -1
  until fd_src.eof?
    remote_name = "#{dst_file}.rc#{"%04d" % (chunk_idx+=1)}"
    tmp_name    = `mktemp -u /tmp/rclone-bkup.XXXXXXXXXX`.strip
    $temp_files << tmp_name
    File.open(tmp_name, 'wb'){|f| f << fd_src.read(chunk_size) }
    puts "  #{tmp_name} => #{remote_name}"
    system %Q|rclone #{RCLONE_OPTS} copyto  #{tmp_name.shellescape}  #{srv_name}:#{remote_name.shellescape}|
    File.unlink tmp_name
  end
  fd_src.close
when 'dl'
  print_usage_and_exit if ARGV.size < 4

  remote_names = `rclone #{RCLONE_OPTS} --include #{src_file.shellescape}.rc\\* lsf #{srv_name}: -R --files-only`.split("\n").sort
  if remote_names.size == 0
    puts "no file found"
    exit 1
  end

  STDERR.puts "download and restore to [#{dst_file}]:"
  fd_dst = dst_file == '-' ? STDOUT : File.open(dst_file, 'wb')
  remote_names.each do |remote_name|
    tmp_name = `mktemp -u /tmp/rclone-bkup.XXXXXXXXXX`.strip
    $temp_files << tmp_name
    STDERR.puts "  #{remote_name} => #{tmp_name}"
    system %Q|rclone #{RCLONE_OPTS} copyto  #{srv_name}:#{remote_name.shellescape}  #{tmp_name.shellescape}|
    File.open(tmp_name) do |fd_chunk| # apppendi il pezzo 10MB al colpo
      fd_dst << fd_chunk.read(1024 * 1024 * 10) until fd_chunk.eof?
    end
    File.unlink tmp_name
  end
  fd_dst.close
else
  puts "action [#{action}] unknown"

  print_usage_and_exit
end

~~~ * ~~~

SSHD on windows via Cygwin
mouse 11 · person cloud · link
Last update
2019-01-02
2019
01-02
« — »
  1. Install packages: openssh and cygrunsrv

  2. Setup and autorun service:

1
2
ssh-host-config -y
cygrunsrv -S sshd
  1. Enable sshd on windows firewall:
    Control Panel > Windows Firewall > Allow a program or feature through Windows Firewall > Allow another program... > type C:\cygwin\usr\sbin\sshd.exe