Skip to content

Instantly share code, notes, and snippets.

var _log = console.log;
window.console.log = function(log){
_log.call(console, log.reverse ? log.reverse() : typeof log === 'string' ? log.split('').reverse().join('') : typeof log === 'number' ? log.toString().split('').reverse().join('') : log);
};
window.console.loge = function (msg) {
var gifs = ['wink','shake-space','peepers','prizza','hat','gradient','fat','rainbow','sunglasses','derp','shake'],
wow = ['', 'wow! ', 'amaze! ', 'dazzle! '],
adjs = ['so', 'such', 'many', 'much', 'very'],
randomizr = function (a) { return a[Math.floor(Math.random() * a.length)];},
message = '%c ' + randomizr(wow) + randomizr(adjs) + ' ' + typeof msg + ': ',
css = 'background-image: url(http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-' + randomizr(gifs) + '-212.gif); background-size: 80px 80px; background-repeat: no-repeat; font-family: \'Comic Sans MS\', cursive; padding: 25px; line-height: 64px; color: white; font-weight: 800; width: 100%; display: block;';
console.log.apply(console, typeof msg === 'object' ? [message, css, msg] : [message += msg, css]);
};
{
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
angular.directive('loginRequired', function() {
return {
restrict: 'A',
transclude: true,
template: '<element ng-if="show"><ng-transclude/></element>',
link: function(scope) {
watch(auth.isLoggedIn(), function(){
scope.show = auth.isLoggedIn()
})
}
@joshhunt
joshhunt / .jshintrc
Created June 1, 2014 23:54
Sash JSHint
{
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
@joshhunt
joshhunt / log.coffee
Last active August 29, 2015 14:05
rainbow log
define [], ->
# Wrap console.log to make it safe to use in IE
log = -> console?.log? arguments...
log.rainbow = (text, fontSize) ->
rainbow = [
'rgb(0, 230, 0)'
'rgb(0, 230, 230)'
'rgb(0, 0, 230)'
'rgb(230, 0, 230)'
@joshhunt
joshhunt / .tmux.conf
Created August 20, 2014 07:05
Tmux config
# Set proper character encoding
set -g utf8
set -g status-utf8 on
set-window-option -g utf8 on
# Make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# Set scrollback history to 10000 (10k)
set -g history-limit 10000
@joshhunt
joshhunt / console.js
Created August 22, 2014 01:18
console surprise
console.log('%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#\n%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#%c#\n%c#%c#################################################%c#%c#%c#%c#%c###\n%c#%c#################################################%c####%c###\n%c#%c################################################%c#%c#%c#%c#%c#%c###\n%c#%c#############################################%c#%c#%c#%c###%c#%c#%c###\n%c#%c#############################################%c##%c#%c#%c#%c#%c#%c#%c###\n%c#%c#############################################%c#%c#%c#%c#%c##%c#%c#%c###\n%c#%c##############################################%c#%c#%c#%c##%c#%c####\n%c#%c########%c#%c######################################%c#%c#%c#%c#%c#%c#%c###\n%c#%c#%c#%c####%c##%c#%c#%c#%c####%c###%c###%c#%c#%c#%c#%c#
# Set proper character encoding
set -g utf8
set -g status-utf8 on
set-window-option -g utf8 on
# Make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# Set scrollback history to 10000 (10k)
set -g history-limit 10000