This is pretty specific to my setup but the idea can be adapted to work with pretty much anything.
Go has a flag package which makes parsing command line arguments really easy.
package main| <?php | |
| /** | |
| * | |
| * This script will copy your wordpress from public_html (or wherever) | |
| * and place it in a staging folder. | |
| * It will then clone the database, reconfigure the config file | |
| * and replace URL's from the original URL to your staging URL. | |
| * It will then make sure to NOT allow search engines to index the page. | |
| * | |
| * Use this script to clone your main wp in order to test maintenance work |
This is pretty specific to my setup but the idea can be adapted to work with pretty much anything.
Go has a flag package which makes parsing command line arguments really easy.
package main| BUILD_DIR := gen | |
| # pandoc is a handy tool for converting between numerous text formats: | |
| # http://johnmacfarlane.net/pandoc/installing.html | |
| PANDOC := pandoc | |
| # pandoc options | |
| # Liberation fonts: http://en.wikipedia.org/wiki/Liberation_fonts | |
| PANDOC_PDF_OPTS := --toc --chapters --base-header-level=1 --number-sections --template=virsto_doc.tex --variable mainfont="Liberation Serif" --variable sansfont="Liberation Sans" --variable monofont="Liberation Mono" --variable fontsize=12pt --variable documentclass=book | |
| PANDOC_EBOOK_OPTS := --toc --epub-stylesheet=epub.css --epub-cover-image=cover.jpg --base-header-level=1 |
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
| /** | |
| * Setup Module with `highlight` filter | |
| */ | |
| var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) { | |
| $locationProvider.html5Mode(false); | |
| }); | |
| JekyllApp.filter('highlight', function () { | |
| return function (text, filter) { |
| # | |
| # Install: | |
| # install https://github.com/github/gollum | |
| # in /srv/wiki do a git init | |
| # add this script to /etc/init/gollum.conf | |
| # | |
| # Usage: | |
| # start/stop/restart gollum | |
| # |