Initialize a git repo in the current directory
# git init
Add a remote called "origin"
Initialize a git repo in the current directory
# git init
Add a remote called "origin"
# adduser someuser
# passwd somepass
// Run the visude, it will probably open up in an editor like Vi
# /usr/sbin/visudo
// Look for this comment: Allow root to run any commands anywhere
root ALL=(ALL) ALL
###Initial installation and configuration Install Git for Windows which includes Git Bash.
Install VirtualBox and Vagrant.
Note: These fixes were not originally done for VirtualBox 5.0 and Vagrant 1.7.4. They are for the previous versions instead: VirtualBox 4.3.30 and Vagrant 1.7.3. Some of these fixes may not be needed now. For example, I recently upgraded to VirtualBox 5.0 and Vagrant 1.7.4 and I did not have to alter the Vagrant ruby (.rb) files as shown in part of this Gist below. I'll soon try from a fresh install (not upgrade) and update this Gist accordingly.
In Git Bash (always run as administrator), type cd ~
to
umount: device is busy. Why? | |
There are several reasons why a file system cannot be unmounted. Here are a few of the reasons. | |
Working directory or file open of a running process | |
# umount /mnt/test | |
umount: /mnt/test: device is busy. | |
(In some cases useful info about processes that use | |
the device is found by lsof(8) or fuser(1)) | |
# lsof /mnt/test/ |
#Trouble Shooting Vagrant Issues
####Vagrant stuck connection timeout retrying
This can happen if the guest machine is turned off improperly (or perhaps the host machine was rebooted without first doing a vagrant halt
). When performing a vagrant up
the machine is waiting on a response (probably "enter" key). You can update the vagrant file to have gui set to true but this will require a vagrant destroy
. Instead, you can send an "enter" key to the machine. Open up a new terminal window and:
// Get the list of running VMs
$ vboxmanage list runningvms
// Will show something like this:
<?php | |
/** | |
* Creates an 80-bit, binary(10) unique identifier. | |
* | |
* Smaller, so indexes fit better in memory/RAM and the hex representation | |
* is still relatively URL friendly. Sequential, so inserts/indexes faster. | |
* (see https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/) | |
* | |
* 4 bit worker id (supports 16 servers, from 0 to 15) |
Collection of some of my fav terminal aliases that i use often & collected from the web. This file will be updated with more aliases as i find more. Feel free to comment and share your fav aliases you use :)
###Follow these simple steps to add the following aliases:###
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `execAsap` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
export function debounce (func, threshold, execAsap) { | |
var timeout | |
return function debounced () { | |
var obj = this | |
var args = arguments |