- Install IDE / Productivity Apps
This file contains 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
// Sample Code | |
// backbone fetch supports Jquery.ajax parameters | |
Model.fetch( { | |
data: {api_key: 'secretkey'}, | |
type: 'POST', | |
success: function(model, response) { | |
console.log('SUCCESS:'); | |
console.log(response); | |
This file contains 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
var delay = (function() { | |
var timer = 0; | |
return function(callback, ms) { | |
clearTimeout(timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); |
This file contains 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
/** | |
Print Objects in Javascript | |
*/ | |
var output = ''; | |
for (property in object) { | |
output += property + ': ' + object[property]+'; '; | |
} | |
console.log(output); |
This file contains 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
// Reference: | |
// http://stackoverflow.com/questions/7344982/questions-on-backbone-js-with-handlebars-js | |
var ArticleListView = Backbone.View.extend({ | |
el: $('#main'), | |
render: function(){ | |
var js = this.collection.toJSON(); | |
var template = Handlebars.compile($("#some-template").html()); | |
$(this.el).html(template({articles: js})); | |
return this; |
This file contains 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
// Inset, Top Shadow Only | |
@include box-shadow(inset 0 1px 1px -1px black); |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>flexbox example - 3 column layout</title> | |
<meta name="author" content="Gwilym Johnston"> | |
<link rel="stylesheet" href="base.css" type="text/css" media="screen"> | |
<style type="text/css"> | |
.flexbox { |
This file contains 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: Ralph Crisostomo | |
*/ | |
@mixin center-element($width, $height) { | |
width:$width; | |
height:$height; | |
position: absolute; | |
top: 50%; | |
left: 50%; |
This file contains 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
.div {margin:10px; position:absolute; top:0; left:0; right:0; bottom:0} |
This file contains 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
# ZSH_THEME="robbyrussell" | |
ZSH_THEME="doubleend" |