Skip to content

Instantly share code, notes, and snippets.

Mira Leung miraleung

View GitHub Profile
@miraleung
miraleung / super-tip.txt
Created Mar 10, 2019 — forked from ericdouglas/super-tip.txt
Change 4 spaces to 2 spaces indentation and change tab to spaces - Vim tip
View super-tip.txt
// 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 May 8, 2018 — 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.
View vm-resize-hard-disk.md

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

View llvm-print-type.cpp
std::string type_str;
llvm::raw_string_ostream rso(type_str);
the_type->print(rso);
@miraleung
miraleung / compile-plt
Created May 15, 2015
Compile Racket plugin to .plt
View compile-plt
#!/bin/bash
PKGNAME=package-name
# From parent directory of plugin name
raco pack --collect $PKGNAME.plt $PKGNAME
View 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}'`
You can’t perform that action at this time.