Skip to content

Instantly share code, notes, and snippets.

@miraleung
miraleung / super-tip.txt
Created March 10, 2019 02:03 — forked from ericdouglas/super-tip.txt
Change 4 spaces to 2 spaces indentation and change tab to spaces - Vim tip
// 4 spaces to 2 spaces
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
// Tab to 2 spaces
:%s/\t/ /g
@miraleung
miraleung / vm-resize-hard-disk.md
Last active April 24, 2021 06:21 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a hard disk for a vagrant-provisioned, VirtualBox-provided virtual machine using gparted and fdisk.

Added gparted instructions to extend the virtual disk to fork from christopher-hopper/vm-resize-hard-disk.md.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

@miraleung
miraleung / vagrant-scp
Last active August 29, 2015 14:21 — forked from geedew/vagrant-scp
#!/bin/sh
# Change these settings to match what you are wanting to do
FILE=/File/To/Copy
DIR=/dir/to/copy
SERVER=localhost
PATH=/Where/To/Put/File
OPTIONS=`vagrant ssh-config | grep -v '^Host ' | awk -v ORS=' ' 'NF{print "-o " $1 "=" $2}'`