The windows key is really missed when running windows in VirtualBox on your Mac. Worry not, the default mapping is the right-Command key to launch the equivalent Windows key.
Connecting to Windows from Macbook Pro
Open up finder, and then
"Go", and "Connect to Server"
smb://IPaddress/sharename OR
smb://IPaddress/
Adding Prettify JSON to Sublime
In Ubuntu, open preferences, browse packages, to get location of packages folder, and open a terminal and change into that folder
$ git clone https://github.com/dzhibas/SublimePrettyJson.git
Ubuntu: /username/.config/sublime-text-2/Packages
The use [Ctrl]+[Alt]+[j] to run the prettify command
or in iOS us [Ctrl]+[Cmd]+[j]
Refer: https://github.com/dzhibas/SublimePrettyJson
Change your Computer Name in Ubuntu
Ran into trouble when using the same VirtualBox appliance on the same network.
1. Open a terminal window.
2. Input the following command and hit Enter:
gksudo gedit /etc/hostname
3. When prompted, enter the administrator password and click the OK button.
4. The hostname file will open, displaying the current computer name. Replace the current computer name with the desired new name.
5. Click Save.
6. Close all open windows and restart your system.
After your system has restarted, it will have the new computer name.
Shutdown, Restart or Reboot a Windows Computer Remotely
Default time is 20 seconds
Refer: support.microsoft.com/kb/317371
shutdown -m \\172.21.104.107 /r
Registry Updates Required
Refer: https://www.groovypost.com/howto/remote-shutdown-restart-windows-10/
Build and copy to shared xampp folder on host machine in Ubuntu
#!/bin/bash
rm -rf /mnt/xampp/*
cd /home/mruckman/Documents/bookingflow
grunt
cd /home/mruckman/Documents/bookingflow/build
cp -r . /mnt/xampp
Better Linux Prompt
Put the following at the bottom of your .bashjrc file
$ nano ~/.bashrc
PS1="\n# ${USER}@${HOSTNAME}\n# \${PWD}\n$ "
Empty Ubuntu Trash Can from Command Line
$ rm -rf ~/.local/share/Trash/
Use Python to format JSON
Easier way to format JSON instead of JSONLINT
With Python 2.6+ you can just do:
echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool
Count lines of code
Search directory structure and count lines of code:
find . -name '*.jsp' | xargs wc -l > ~/lines-per-jsp.txt
