Skip to content

Instantly share code, notes, and snippets.

View benneic's full-sized avatar

Benn Eichhorn benneic

  • Roamz
  • Sydney, Australia
View GitHub Profile
@benneic
benneic / workflows-in-django.md
Created February 21, 2020 04:25 — forked from Nagyman/workflows-in-django.md
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@benneic
benneic / git-deployment.md
Created December 2, 2019 02:45 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@benneic
benneic / Makefile
Created February 28, 2019 00:01 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@benneic
benneic / gitbuildbump-runscript.sh
Last active July 19, 2016 02:43 — forked from jaredsinclair/set-build-number.sh
Simple, Git-friendly run script for automated build numbering in Xcode
#
# Set the build number to the current git commit count.
# If we're using the Dev scheme, then we'll suffix the build
# number with the current branch name, to make collisions
# far less likely across feature branches.
# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/
#
# Updated with dSYM handling from http://yellowfeather.co.uk/blog/auto-incrementing-build-number-in-xcode-revisited/
#
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Roman Kalyakin
#
# EC2 to Route53 magic
#
# https://gist.github.com/4449827
#
{
'metrics' : {
'2012' : {
'm1' : 1,
'm' : {
'01' : {
'm1' : 1,
'd' : {
'01' : {
'h' : {