This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Dan Richards <[email protected]> | |
* | |
* Assumes a compiled handlebars template is available. | |
* @see http://handlebarsjs.com/precompilation.html | |
*/ | |
(function ($) { | |
$.extend({ | |
alert: function(message, params) { | |
var alertContainer = $('#alerts'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use default vlaue | |
*/ | |
_.mixin({ | |
default: function(value, default_val) { | |
if (value === null && typeof value === "object") { | |
return default_val; | |
} | |
return _.isUndefined(value) || _.isNull(value) ? default_val : value; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Find a unique slug. | |
* | |
* @see https://github.com/cocur/slugify | |
* @param $text | |
* | |
* @return string | |
*/ | |
public static function getUniqueSlug($text) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Console2 Settings can be reached by pressing Ctrl + Alt + S | |
# Use nano instead of vim | |
EDITOR=nano | |
# always list in long format | |
alias ls='ls -la --color' | |
# set dynamic prompt and window/tab title | |
PS1='\[\e]0;${PWD##*/}\a\]\n' # set window title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------ | |
# IF YOU EDIT THIS FILE OUTSIDE OF THE SERVER, BE SURE YOUR LINE | |
# ENDINGS ARE SET TO UNIX. SublimeText2 > View > Line Endings > Unix | |
# ------------------------------------------------------------------ | |
# Put .danrc into the same folder as your .bashrc file | |
# Typically, this is /home/username/ | |
# $ sudo nano /home/username/.bashrc | |
# Include in your .bashrc file | |
# source .danrc | |
# ----------------------------------------------------------------- |
NewerOlder