As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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
# JavaScript | |
## VS Code JavaScript (ES6) snippets | |
### Import and export | |
| Trigger | Content | | |
| -------: | ------- | | |
| `imp→` | imports entire module `import fs from 'fs';`| | |
| `imn→` | imports entire module without module name `import 'animate.css'` | | |
| `imd→` | imports only a portion of the module using destructing `import {rename} from 'fs';` | |
valet uninstall
sudo brew services stop nginx
sudo brew services stop php70
sudo brew services stop dnsmasq
brew uninstall nginx
brew uninstall php70
brew uninstall dnsmasq
rm -rf ~/.valet
rm /usr/local/bin/valet
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example,vagrant init ubuntu/trusty64
.
vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> | |
</head> | |
<body> | |
<div class="buttons"> | |
<a href="#0" class="btn btn1"> |
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
/* Source: http://nicolasgallagher.com/micro-clearfix-hack/ */ | |
/* For modern browsers */ | |
.cf:before, | |
.cf:after { | |
content:""; | |
display:table; | |
} | |
.cf:after { |
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
<?php | |
define("n","\n"); | |
define("br","<br />"); | |
function buildTopMenu($pages, &$depth, $selector='', $maxDepth=2) { | |
global $active; | |
$out = ''; | |
if($depth <= $maxDepth && $pages->getTotal() > 0) { | |
$depth++; | |
$out .= "<ul class='depth-{$depth}'>".n; | |
foreach($pages as $p) { |