Skip to content

Instantly share code, notes, and snippets.

cshireman /
Created July 8, 2020 15:13
Repair a certbot installation when python errors happen.
sudo /opt/ install cryptography interface zope
View Titanium: Color Animation
function parseColor(color) {
// from
var match, triplet;
// Match #aabbcc
if (match = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(color)) {
triplet = [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16), 1];
// Match #abc
} else if (match = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(color)) {
cshireman /
Created August 15, 2014 18:57
BASH: Phabricator workflow bash functions
# Shortcut replacement for fetching and rebasing into your current branch. This can be used either as a substitute for git pull, or a way to rebase changes from the primary branch into your local feature/bug branch.
# $1 = either 'dev' or 'rel' depending on which branch you want to rebase into your branch. If it is neither 'dev' or 'rel' then it should be a remote branch you want to rebase into your branch (e.g. origin/branch_name)
# Example usage: gitup dev
# Example usage: gitup rel
# Example usage: gitup origin/branch_name
cshireman / gist:288426a6f8a09cbaa243
Created August 14, 2014 04:46
Titanium: Alloy viewDidAppear
View gist:288426a6f8a09cbaa243
//Equivalent to viewDidAppear. Have to use a state variable to make sure this is only called once.
$.hasAppeared = false;
$.hasAppeared = true;
cshireman / gist:e5ad09eedd605957e064
Created August 14, 2014 04:10
Titanium: Header Comment
View gist:e5ad09eedd605957e064
* filename.js
* Description: File description goes here
* Author: Christopher Shireman
* Create Date: Today's Date