Monday, June 26, 2017

Start VPN from command line in Fedora

Use nmcli command


[user1@localhost ~]$ nmcli c 
NAME            UUID                                  TYPE            DEVICE 
eno1            c9----------91  802-3-ethernet  eno1   
virbr0          fb----------a3  bridge          virbr0 
Canada          67----------3d  vpn             --     
US-East         b3----------5a  vpn             --     
United-Kingdom  eb----------5f  vpn             --     


[user1@localhost ~]$ nmcli c up b3----------5a
VPN connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)


[user1@localhost ~]$ nmcli c down b3----------5a
Connection 'US-East' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

Monday, May 15, 2017

Create PDF from multiple JPGs

install ImageMagick

dnf install ImageMagick

To create a pdf from multiple source files:

convert *.jpg output.pdf

convert and resize source images to 50% smaller:

convert -resize 50% *.jpg output.pdf

Monday, February 20, 2017

openvpn p12 file creation

openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12 -name MyClient

https://syedali.net/2014/02/17/using-chromebook-to-connect-to-an-openvpn-server/

http://www.frogiswrong.com/blog/articles/8/openvpn-on-openwrt-a-little-more-detail

Sunday, January 29, 2017

Create DVD from the command line

Convert the source to an NTSC compatible DVD video format
ffmpeg  -i saltbae.mp4  -target ntsc-dvd  -aspect 16:9  saltbae.mpg

Author the DVD compatible video into the DVD container format with chapters every 5 minutes
dvdauthor  -o DVD/ -t -c 0,5:00,10:00,15:00,20:00,25:00,30:00,35:00,40:00 saltbae.mpg

Create the table of contents files VIDEO_TS.IFO
dvdauthor -T -o DVD

Done

Saturday, January 28, 2017

How to set time restrictions in Windows 10 from the command line



net user /time:,

User1 allowed to use the computer weekdays from 1-11pm

net user user1 /time:M-F,1pm-11pm

User2 allowed to use the computer Saturday from 8am-4pm, and  weekdays from 9am-9pm

net user user2 /time:Sa,8am-4pm;M-F,9am-9pm

Reset to defaults
net user user1 /time:all  


Show stats net user user1

Sunday, December 11, 2016

How to change default background in Aeon Nox


On Android internal SD card, replace:

/data/org.xbmc.kodi/files/.kodi/addons/skin.aeon.nox.5/backgrounds/default_bg.jpg

with another JPG of 1920x1080

This will repace the default Gravity background with another JPG for all Kodi screens.

.kodi is a hidden directory
Copy can be done simply with MiExplorer or something similar.

Saturday, October 22, 2016

Youtube download of 4k UHD video

[funderwood@localhost ~]$ youtube-dl -F https://youtu.be/Zk9J5xnTVMA

This shows the available video formats and resolutions.  

[youtube] Zk9J5xnTVMA: Downloading webpage
[youtube] Zk9J5xnTVMA: Downloading video info webpage
[youtube] Zk9J5xnTVMA: Extracting video information
[youtube] Zk9J5xnTVMA: Downloading MPD manifest
[info] Available formats for Zk9J5xnTVMA:
format code  extension  resolution note
249          webm       audio only DASH audio   56k , opus @ 50k (48000Hz), 1.71MiB
250          webm       audio only DASH audio   78k , opus @ 70k (48000Hz), 2.32MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k (44100Hz), 4.21MiB
171          webm       audio only DASH audio  139k , vorbis@128k (44100Hz), 4.31MiB
251          webm       audio only DASH audio  145k , opus @160k (48000Hz), 4.51MiB
160          mp4        256x144    DASH video  112k , avc1.4d400c, 24fps, video only, 3.65MiB
278          webm       256x144    DASH video  123k , webm container, vp9, 24fps, video only, 3.31MiB
133          mp4        426x240    DASH video  250k , avc1.4d4015, 24fps, video only, 8.13MiB
242          webm       426x240    DASH video  295k , vp9, 24fps, video only, 7.69MiB
243          webm       640x360    DASH video  559k , vp9, 24fps, video only, 14.21MiB
134          mp4        640x360    DASH video  677k , avc1.4d401e, 24fps, video only, 19.14MiB
244          webm       854x480    DASH video 1017k , vp9, 24fps, video only, 26.14MiB
135          mp4        854x480    DASH video 1183k , avc1.4d401e, 24fps, video only, 36.11MiB
247          webm       1280x720   DASH video 2090k , vp9, 24fps, video only, 52.00MiB
136          mp4        1280x720   DASH video 2392k , avc1.4d401f, 24fps, video only, 69.38MiB
248          webm       1920x1080  DASH video 3405k , vp9, 24fps, video only, 91.30MiB
137          mp4        1920x1080  DASH video 4595k , avc1.640028, 24fps, video only, 125.58MiB
264          mp4        2560x1440  DASH video 10578k , avc1.640032, 24fps, video only, 270.37MiB
271          webm       2560x1440  DASH video 10767k , vp9, 24fps, video only, 279.32MiB
313          webm       3840x2160  DASH video 22275k , vp9, 24fps, video only, 588.32MiB
266          mp4        3840x2160  DASH video 23379k , avc1.640033, 24fps, video only, 587.81MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
43           webm       640x360    medium , vp8.0,  vorbis@128k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)


Pay attention to the format 266 which is 3840x2160  and the m4a audio container.  Use the folowing to download and join (otherwise video-only or audio-only will download).

[funderwood@localhost ~]$ youtube-dl -f 266+140  https://youtu.be/Zk9J5xnTVMA
[youtube] Zk9J5xnTVMA: Downloading webpage
[youtube] Zk9J5xnTVMA: Downloading video info webpage
[youtube] Zk9J5xnTVMA: Extracting video information
[youtube] Zk9J5xnTVMA: Downloading MPD manifest
[download] Destination: Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f266.mp4
[download] 100% of 587.81MiB in 01:50
[download] Destination: Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f140.m4a
[download] 100% of 4.21MiB in 00:00
[ffmpeg] Merging formats into "Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.mp4"
Deleting original file Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f266.mp4 (pass -k to keep)
Deleting original file Road to Machu Picchu - Peru in 4K-Zk9J5xnTVMA.f140.m4a (pass -k to keep)
[funderwood@localhost ~]$