This is the sequence of steps to follow to create a root gh-pages
branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
#!/bin/bash | |
# | |
# Example of how to parse short/long options with 'getopt' | |
# | |
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"` | |
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi | |
echo "$OPTS" |
#!/bin/sh | |
# | |
# This pre-commit hook tests that the documentation builds correctly. | |
# It can be disabled by using the "-n" option with "git commit". | |
# | |
# See http://git-scm.com/book/en/Customizing-Git-Git-Hooks for details. | |
# | |
# This pre-commit hook requires that you have the "###PROJECT###" project on your python | |
# path, in order for the DJANGO_SETTINGS_MODULE=###PROJECT###.settings to work. | |
# This is needed to build the apidoc. |
<?php | |
/** | |
* @version 1.0.0 | |
* @package com_stats | |
* @copyright Copyright (C) 2012. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
// No direct access. | |
defined('_JEXEC') or die; |
# This snippet was written by Dimitri Racordon ([email protected]) | |
# | |
# Copyright (c) 2015 Dimitri Racordon | |
# Licensed under the The MIT License (MIT). | |
class lazy(object): | |
# This class is heavily inspired by the werkzeug.utils.cached_property | |
# decorator. It transforms a class method to a lazy property, evaluated | |
# the first time the property is accessed. |
#!/bin/bash | |
BACKUP_DIR="/Root/Backup/" | |
PIECE_SIZE=10M | |
ACTION=store | |
trap "exit 2" SIGINT | |
if [[ $1 =~ -h|--help ]]; then |
Ref : stackoverflow
The best solution in my opinion is to use the unittest
[command line interface][1] which will add the directory to the sys.path
so you don't have to (done in the TestLoader
class).
For example for a directory structure like this:
new_project
├── antigravity.py
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks