Build Ruby command-line tool

Build Ruby command-line tool

How do I make a command-line tool in Ruby?

A good simple (native) example: ar1hur/gitkeep · GitHub

Ruby Gems for Command-Line Apps - Build Awesome Command-Line Applications in Ruby

Thor Commander - Complete solution for Ruby command-line executables

Ruby Learning examples ~ scripts for MySQL backup

jbraeuer/mysql-tools · GitHub

mysteriousmudcrab/backup · GitHub

christianhellsten/mysql-backup · GitHub adaline/cloud_backup · GitHub

This Ruby uses pigz: vsyrovat/backups · GitHub

Just for info - incredible Ruby backup tool: meskyanichi/backup · GitHub

Vagrant plugin examples

Vagrant plugin development: calavera/vagrant-sync · GitHub

Windows Port Forwarding

PortProxy - SixXS Wiki Netsh commands for Interface Portproxy: IPv6; Scripting

delete v4tov6 listenport= {Integer | ServiceName} [[listenaddress=] {IPv4Address| HostName}] [[protocol=]tcp]

netsh interface portproxy add v4tov4 listenport=53 connectport=5300

PassPort port forwarding utility Win XP | Free System Administration software downloads at

Change DNS port in Windows (restart required) Control the DNS Port Used for Lookups at Registry Guide for Windows

DNS server in Ruby

Maybe write small DNS forwarder for Windows Vagrant

narkisr/vagrant-dns-server · GitHub ioquatix/rubydns · GitHub Setting up a Ruby based DNS Server « Dharana Software

Big problem / Slow Windows performance on shared folders

Developing with Vagrant and Git on a Windows box Increased performance in Vagrant |

shared folders « It’s all bullshit

Problems with shared folders in VirtualBox

Maybe use NFS server on Windows: Networking Software for Windows

shared folders « It’s all bullshit Samba is really the fastest. But symlinks will not work.

Samba / CIFS

Best is to use Samba share on windows, and connect to it on Linux VM.

1: Share Folder From Command Line in Windows net user guest /active:yes net share vagrant /DELETE net share vagrant="%CD%\projects" /GRANT:Everyone,FULL /REMARK:“Shared dir for Linux box” Icacls “%CD%\projects” /grant Everyone:F /inheritance:e /T

2: Networking between host and guest VMs in VirtualBox Mount A Network Share On Linux / Ubuntu | LINHOST.INFO

apt-get install cifs-utils

mkdir /mnt/vagrant
mount.cifs // /mnt/vagrant -o user=vagrant,pass=vagrant

or like this:
    mount.cifs //  /mnt/vagrant -o user=,pass=

echo "// /mnt/vagrant cifs username=dummy,password=dummy 0 0" >> /etc/fstab

And it works.

E: Cannot allocate memory

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache
reg query "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v Size

Change the values with:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /f /v LargeSystemCache /t REG_DWORD /d 1
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /f /v Size /t REG_DWORD /d 3

Source: Fix for mount error(12): Cannot allocate memory

Change DNS from command line:

1. Detect active (and first in order by InterfaceMetric:) connection name
2. Change DNS server for that connection

Interesting: ipconfig /registerdns How to Change a Computer’s Domain Name System Server from the Command Line The Regfind Tool Configure TCP/IP from the Command Prompt

reg query “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\parameters”


date 01. Jan 0001 | modified 28. May 2021
filename: Ruby - Notes