-
Open up
httpd.conf
(/Applications/MAMP/conf/apache/httpd.conf) -
Uncomment the line under Virtual Hosts:
Looks like this:
# Virtual hosts #Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Should look like this:
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
<VirtualHost *:80> | |
ServerAdmin webmaster@dummy-host.example.com | |
DocumentRoot "/Users/username/code/wp" | |
ServerName wp.website.com | |
ServerAlias wp.website.com | |
ServerAlias wp-website.*.xip.io | |
ErrorLog "logs/error_log_website.log" | |
<Directory "/Users/username/code/wp/"> | |
Options Indexes FollowSymLinks Includes | |
AllowOverride All |
A good "ready-to-use tool" option could be http-server:
npm install http-server -g
To use it:
cd D:\Folder
http-server
Or, like this:
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
app.factory('storage', function() { | |
var store = {} | |
function set(key, data) { | |
store = data; | |
localStorage.setItem( key, JSON.stringify( data ) ); | |
} | |
function get( key ) { |
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 | |
// Inside functions.php | |
function get_category_posts(){ | |
$nonce = $_POST['nonce']; | |
// check to see if the submitted nonce matches with the | |
// generated nonce we created earlier | |
if ( ! wp_verify_nonce( $nonce, 'my-nonce' ) ) |
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
module.exports = { | |
convert: function( text ){ | |
// all HTML4 entities as defined here: http://www.w3.org/TR/html4/sgml/entities.html | |
// added: amp, lt, gt, quot and apos | |
this.entityTable = { | |
34 : 'quot', | |
38 : 'amp', | |
39 : 'apos', |
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 console_log ( $output ) { | |
echo '<script>'; | |
echo 'console.log('. json_encode( $output ) .');'; | |
echo '</script>'; | |
} |
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
<img src="http://graph.facebook.com/4/picture?type=large" alt="Mark Zukerberg's Profile Picture"> |
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
var app = angular.module('boostrapButton', []); | |
app.directive('btn', function () { | |
return function ( scope, element, attrs ) { | |
var classes = attrs.btn.split(' '); | |
classes.unshift('btn'); | |