mkdir ~/Sites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory "/Users/magnus/Sites"> | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
<Virtualhost *:80> | |
VirtualDocumentRoot "/Users/magnus/Sites/%0/public" | |
ServerName sites.test | |
ServerAlias *.test |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p><video style="width:100%" controls=""><br><source src="/sites/default/files/bergvik_sommar_20_640x360.mp4" type="video/mp4"><br></video></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restart DNSMASQ | |
# When changes has been made to /etc/hosts - run this | |
sudo kill -HUP $(pgrep dnsmasq) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Install node.js | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
sudo apt-get install nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseTime(inp) { | |
return eval(inp.replace(/(secs|second|seconds)/gi, "s").replace(/(mins|minute|minutes)/gi, "m").replace(/(hour|hours)/gi, "h").replace(/(day|days)/gi, "d").replace(/(week|weeks)/gi, "w").replace(/[^0-9hdwms]/gi, "").replace(/([a-z])/gi, "$1+").replace("h", "*60").replace("d", "*60*8").replace("w", "*60*8*5").replace("m", "*1").replace("s", "/60") + "-0"); | |
} |