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 express = require('express'); | |
var fs = require('fs'); | |
var hbs = require('hbs'); | |
var app = module.exports = express.createServer(); | |
app.configure(function(){ | |
app.set('views', __dirname + '/views'); | |
//app.set('view engine', 'jade'); | |
app.set('view engine', 'hbs'); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
App= { | |
/* | |
config= { | |
options:{ | |
host: 'ichart.yahoo.com', | |
path: '/table.csv?s=GOOG&a=01&b=1&c=2013' | |
}, | |
success: function(json){}, | |
error: function(error){} | |
} |
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 async = require('async'); | |
async.forEach([], | |
function(arg, callback){ | |
//do this for each item in list | |
//then | |
callback(null); | |
}, | |
//completion | |
function(err){ |
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
function dollars(num){ | |
num= Number(num); | |
return Math.round(num*100)/100 | |
} |
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
func setUpLayout(){ | |
//This is an example of setting up a responsive layout using NSConstraints | |
//Compared to html/css it is absolutely insane. | |
//We'll try to do this as little as possible, | |
//but this setup will go a long way in future proofing our layout. | |
//set view properties | |
//By Default these are white. |
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
// | |
// DBNibLoadingView.swift | |
// Created by Damien Bell on 2/15/16. | |
// Copyright © 2016 Damien Bell. All rights reserved. | |
// | |
//How To Use: | |
//Create a nib file where the name of the file matches the class name | |
//set the xib's files owner to the relevant class. Important! set files owner and not the UIView class on the xib object itself | |
//Using this approach you can still set iboutlets and properties as normal | |
import UIKit |
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
// | |
// MKMapViewExtension.swift | |
// AutocompleteTextfieldSwift | |
// | |
// Created by Mylene Bayan on 2/22/15. | |
// Copyright (c) 2015 MaiLin. All rights reserved. | |
// | |
import Foundation | |
import MapKit |
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
// | |
// PFObjectExtensions.swift | |
// Only Indie Coffee | |
// | |
// Created by Damien Bell on 5/30/16. | |
// Copyright © 2016 Damien Bell. All rights reserved. | |
// | |
import Foundation | |
import Parse |
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
// | |
// ShopsDetailsTableViewController.swift | |
// Only Indie Coffee | |
// | |
// Created by Damien Bell on 5/31/16. | |
// Copyright © 2016 Damien Bell. All rights reserved. | |
// | |
import UIKit |
OlderNewer