Skip to content

Instantly share code, notes, and snippets.

View Amourspirit's full-sized avatar

:Barry-Thomas-Paul: Moss Amourspirit

  • Hamilton, Ontario, Canada
View GitHub Profile
@kyouko-taiga
kyouko-taiga / wrapper.py
Last active August 9, 2023 06:05
A python class wrapper to instrument/override properties
# 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.
@digitaljhelms
digitaljhelms / gist:4287848
Last active May 5, 2025 08:29
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@dongilbert
dongilbert / lead_controller.php
Created December 3, 2012 15:00
Joomla Export to CSV
<?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;
@magopian
magopian / pre-commit
Created November 16, 2012 10:40
git pre-commit hook for sphinx documentation
#!/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.
@cosimo
cosimo / parse-options.sh
Created September 21, 2012 09:31
Example of how to parse options with bash/getopt
#!/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"
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

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" &gt; index.html