Skip to content

Instantly share code, notes, and snippets.

View openam's full-sized avatar
💭
...

Michael Tuttle openam

💭
...
  • Vivint Solar
  • Utah, United States
View GitHub Profile
@openam
openam / rmkdir.php
Created February 26, 2014 17:19
Make Directories Recursively in PHP 4
<?php
/**
* rmkdir is a recursive mkdir function. PHP4 doesn't have the recursive paramater,
* so this was added to use on a PHP 4 server. These references could be changed back to
*
* @param string $path
* @param int $mode of the file permissions
* @param boolean $recursive not used, but is there so that you can easly change from rmkdir (PHP 4) to mkdir(PHP 5) easily
* @return boolean true if directories were successfully created
*/
@openam
openam / pre-commit
Created January 13, 2014 19:22
a pre-commit hook to look for words commonly used for debugging in js, php, and ctp files.
#!/usr/bin/env bash
#
# A Git pre-commit hook that checks for discouraged words in
# in files based on the extensions of staged files in Git.
#
# Copyright 2014, openam (http://github.com/openam)
# http://www.davidpashley.com/articles/writing-robust-shell-scripts/
set -o nounset
set -o errexit
@openam
openam / Base File.sublime-settings
Last active December 27, 2015 10:49
Sublime Text Settings Preferences: Settings - User Default (Linux): Key Bindings - User Package Control: Package Settings -> Package Control -> Settings - User Base File: Package Settings -> DocBlockr -> Settings - User
{
"jsdocs_align_tags": "no",
"jsdocs_spacer_between_sections": true
}
@openam
openam / bash_aliases.bash
Last active December 17, 2015 16:29
Bash Prompt
# Colors from https://wiki.archlinux.org/index.php/Color_Bash_Prompt
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
@openam
openam / Default (Linux).sublime-keymap
Created November 10, 2012 19:00 — forked from coldnebo/Default (Linux).sublime-keymap
simple scripts to prettify your xml and json in sublime text 2
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]