-->

Tuesday, May 28, 2019

Git Tips

Git can be confusing. You try cloning someone else's repo and it doesn't work. Or you = try to move branches…its all kinda counter intuitive. Unless I write down some important lessons learned right here.


Add Collaborators

  • The master of the repository has to add users to allow them to interact with stuff. I'm yet to master the security features, as I accidentally overrode the master branch today (DAMMIT)
  • Here is the link to the guide used.


Who are you?

To collaborate you must set your glob= al user variables under config.
  • git config --global user.= name
  • git config --global user.email
  1. git con= fig --global core.editor [vi | cat | w]
    Change = the main editor to vi or cat, etc

Git Branch =Making New Backup Folders

I like to think of branches as different backup folders. As one familiar with most DOS commands, what is the equivalent of making a new folder (mkdir) and cding into it? Let along listing (ls) them?

mkdir
git branch [branchName]
ls
git branch -= a
cd
git checkout [branchName]

  1. git branch -a =3D=3D ls [= your branches] 
  2. git branch [branchName]= =3D=3D create a new branch
  3. git checkout [branchNam= e] =3D=3D cd to your brannch


Git Add = Prepare to Save.

    1.  You need to use -a or . from within t= he same folder as the .gitignore command for this to work.

Git Commit = Save Local Copy, but you need to have a message (apparently)


  • Commit doesn't like you unless you add in -m after calling the command. So you must either vi or cat or something else. As long as there is a message.

After Cloning, you have to work within the folder itself

  • No amount of trying to add the folder I cloned seemed to cause the thing to be sta= ged. You have to work where the .gitignore file is.


Resizing Disks in Virtual Box

Use this guide




Quick Tips:

  1. This will only work on Dynamically Allocated Disks. It will NOT work on fixed disks.
  2. Put .\ in front of the command vboxmanage.exe

Sample Command:

.\vboxmanage.exe modifymed= ium "C:\Users\David\VirtualBox VMs\Ubuntu2019\VirtSSD.vhd" --resize 3= 0999


Friday, May 24, 2019

Virtual Box Optimization 2

Lately, I've grown very serious about the power of Linux.

I experimented with a couple of guides on how to optimize your virtual Linux experience and discovered that a workable environment is indeed doable. Unfortunately, I allocated my first successful Virtual Box to have a very small hard disk of ten gigabytes. So, I experimented with simply reinstalling the entire thing, only to suffer from additional issues.

Here, I roughly jot down lessons learned.

Environment:
Windows 8 -> Windows 10
C Drive: SSHD
D Drive: HHD
E Drive: SSD

Experiment #1: Installing Virtual Hard Disk onto a machine separate from the host Machine.

It is said that installing a virtual hard drive onto a separate (actual) disk (such as on disk D) would help spare resources. Unfortunately, it only appeared to lead to other issues. Though it installed at first, eventually, there were hang ups as it refused to start. Guides that I looked into implied that there are in fact, issues concerning having Virtual Box look for a VHD that is on another

Experiment #2: Reinstalling Virtual Box onto the external drive.

As such, I decided to do several experiments with a new SSD that I purchased for pure storage. I reinstalled VirtualBox to my E drive, but now all Virtual Machines refuse to start, including new virtual machines I make from scratch. Seems this blogger has a lot more lessons to learn, and will share them in time.

Virtual Box Optimization

If you are a developer who works in windows, it is nonetheless important to know and work with linux. If you're like me, most of your linux experience has been via VirtualBox, where you followed a few guides and installed it.

If you're like me, you might have then mistakenly begun to associate linux with "slow."

However, what if I told you that if you think a linux virtual machine is bad, then the problem is with your Virtual Configurations and not with the operating system.

Allow me to share a couple guides and configuration tips.


Key Takeaways

I. Ensure that you are using as many processors as you can spare.

[pict pending]

Don't just leave things at the default processor size. Give it 4 cores if at all possible.

II. Invest in more RAM and assign (at least) 8 GB of Ram to your Virtual Machine

[pict pending]

RAM is the easiest piece of hardware to swap. Though it might seem expensive, investing in 32 GB of RAM is a godsend to your host environment if you also want it to run a true virtual environment alongside it.

Upgrade your RAM and ensure you are using a fair amount of it for your VM.


III. Ensure the Display is set to 128 GB and tied to a graphics card (if applicable)

[pict pending]

As with videogames, weak graphical memory leads to weak performance and LAG spikes. If you want decent FPS (frames per second) with VirtualBox, you have to treat it as you would a video game.

If you are using NVidia GPU, open the NVidia Control Panel and have it override the default settings for VirtualBox.

In conjunction with this, make sure the VBoxVGA is chosen as your graphics controller. Keep Acceleration disabled.


Additional Resources