A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
- Headers
- Links
- Bold
- Emphasis
- Deletions
| <?php | |
| add_theme_support( 'starter-content', array( | |
| // Content Section for Widgets | |
| 'widgets' => array( | |
| // Sidebar | |
| 'sidebar-1' => array( | |
| // Widget ID | |
| 'my_text' => array( | |
| // Widget $id -> set when creating a Widget Class |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| #!/usr/bin/env bash | |
| if [ $EUID -ne 0 ]; then | |
| echo "You must be root: \"sudo ngxdis\"" | |
| exit 1 | |
| fi | |
| # -z str: Returns True if the length of str is equal to zero. | |
| if [ -z "$1" ]; then | |
| echo "Please choose a site." |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| var elixir = require('laravel-elixir'); | |
| var gulp = require('gulp'); | |
| var uglify = require('gulp-uglify'); | |
| var minify = require('gulp-minify-css'); | |
| var _ = require('underscore'); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Uglify Task | |
| |-------------------------------------------------------------------------- |
| <?php | |
| class comment_walker extends Walker_Comment { | |
| var $tree_type = 'comment'; | |
| var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' ); | |
| // constructor – wrapper for the comments list | |
| function __construct() { ?> | |
| <section class="comments-list"> |
| onAfterDispatch | |
| onAfterExecute | |
| onAfterInitialise | |
| onAfterRender | |
| onAfterRespond | |
| onAfterRoute | |
| onAfterSessionStart | |
| onBeforeCompileHead | |
| onBeforeExecute | |
| onBeforeIndex |