Skip to content

Instantly share code, notes, and snippets.

View ralphcrisostomo's full-sized avatar

Ralf Crisostomo ralphcrisostomo

  • Goodstuff
  • Australia
View GitHub Profile
@ralphcrisostomo
ralphcrisostomo / tmux-cheatsheet.markdown
Created January 22, 2016 04:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ralphcrisostomo
ralphcrisostomo / Gruntfile.coffee
Created January 6, 2014 04:30
grunt task jasmine server
# ----------
# Jasmine Server
# ----------
grunt.registerTask 'jasmine-server', 'start web server for jasmine tests in browser', ->
grunt.task.run 'jasmine:tests:build'
grunt.event.once 'connect.tests.listening', (host,port) ->
specRunnerUrl = 'http://' + host + ':' + port + '/_SpecRunner.html'
grunt.log.writeln 'Jasmine specs available at: ' + specRunnerUrl
require('open')(specRunnerUrl)
grunt.task.run 'connect:tests:keepalive'
@ralphcrisostomo
ralphcrisostomo / defaults.json
Created December 19, 2013 10:53
copy defaults.json inside .grunt-init directory
{
"author_name": "Ralph Crisostomo",
"author_email": "rrecrisostomo@gmail.com",
"author_url": "http://ralphcrisostomo.net/"
}
# source: http://mashable.com/2013/10/23/clean-install-os-x-mavericks/
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
@ralphcrisostomo
ralphcrisostomo / moom-settings-transfer
Created October 9, 2013 11:34
Moom Settings Transfer
# source: http://macorios.com/blog/2013-2-28-sync-moom-between-two-or-more-macs
# Copy this file to the new mac.
~/Library/Preferences/com.manytricks.Moom.plist.lockfile
@ralphcrisostomo
ralphcrisostomo / Console.Fix.For.All.Browser.js
Last active December 19, 2015 22:19
Avoid `console` error in browsers that lack a console.
<script type="text/javascript">
// Avoid `console` errors in browsers that lack a console.
if (!(window.console && console.log)) {
(function() {
var noop = function() {};
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
var length = methods.length;
var console = window.console = {};
while (length--) {
console[methods[length]] = noop;
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
.wrapper {
background-image: url("../img/bg.jpg");
background-repeat: no-repeat;
background-position: center center;
@include background-size(cover);
}
# TO USE:
# window.app.helpers.browserDetect.initialize()
# window.app.helpers.browserDetect.browser == "Safari"
# window.app.helpers.browserDetect.version == 2
"use strict";
window.app = window.app or {}
window.app.helpers = window.app.helpers or {}
excerpt : ( string, total ) ->
string = string.substring(total)
string += "..."
string