Skip to content

Instantly share code, notes, and snippets.

View anoxic's full-sized avatar
🐙
working on it all at once

Bad Sir Brian anoxic

🐙
working on it all at once
View GitHub Profile
@anoxic
anoxic / git-completion.bash
Last active July 1, 2018 22:39 — forked from qbit/gist:5483415
KSH support for git-prompt
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@anoxic
anoxic / git_branch_naming.md
Last active May 22, 2018 15:54 — forked from revett/git_branch_naming.md
Git Branch Naming Conventions

<type>-<name>

<type>

bug    - Code changes linked to a known issue.
clean  - Cleans up whitespace, organization, re/de-factoring.
dev    - Experiments (will not be merged without a rename). Doesn't need a status.
feat   - New feature.
hotfix - Quick fixes to the codebase.
perf - Performace enhancements.
@anoxic
anoxic / expecting.md
Created November 20, 2016 08:52 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
<?php
class SaltedHash {
protected $salt;
protected $active_hash;
const SALT_LENGTH = 15;
function __construct($hash=null) {
$this->active_hash = $hash;