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 frontend = require('../controllers/frontend'); | |
module.exports = function (server) { | |
/*jslint regexp: true */ | |
// ### Frontend routes | |
server.get('/rss/', frontend.rss); | |
server.get('/rss/:page/', frontend.rss); | |
server.get('/page/:page/', frontend.homepage); | |
server.get('/blog/', frontend.homepage); |
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
// Module dependencies | |
var crypto = require('crypto'), | |
express = require('express'), | |
hbs = require('express-hbs'), | |
fs = require('fs'), | |
uuid = require('node-uuid'), | |
Polyglot = require('node-polyglot'), | |
semver = require('semver'), | |
_ = require('lodash'), | |
when = require('when'), |
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
// Component is a collection of links that have a viewing and editing state. | |
var Link = React.createClass({ | |
mixins: [React.addons.LinkedStateMixin], | |
getInitialState: function() { | |
return { | |
title: this.props.title, // Copy props to state so we can use LinkedStateMixin. This feels like a hack. | |
description: this.props.description | |
}; | |
}, |
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
FROM stackbrew/ubuntu:trusty | |
RUN apt-get update && apt-get install -y software-properties-common --force-yes && add-apt-repository -y ppa:chris-lea/node.js | |
RUN apt-get update && apt-get -y install nodejs | |
RUN npm install -g grunt-cli bower gulp | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
WORKDIR /srv/www | |
ADD . /srv/www | |
RUN npm install |
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
FROM stackbrew/ubuntu:trusty | |
RUN apt-get update && apt-get install -y software-properties-common --force-yes && add-apt-repository -y ppa:chris-lea/node.js | |
RUN apt-get update && apt-get -y install nodejs | |
RUN npm install -g bower gulp | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
WORKDIR /srv/www | |
ADD . /srv/www | |
RUN npm install && bower install |
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
{ | |
init: function(elevators, floors) { | |
floors.forEach(function(floor) { | |
floor.on("up_button_pressed", function() { | |
var emptiestElevator = getEmptiestElevator(); | |
emptiestElevator.goToFloor(floor.floorNum()); | |
}); | |
floor.on("down_button_pressed", function() { | |
var emptiestElevator = getEmptiestElevator(); | |
emptiestElevator.goToFloor(floor.floorNum()); |
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
{ | |
"count": 4, | |
"results": [ | |
{"title": "Drunk J Crew", "image": "http://i.imgur.com/XKkITfW.jpg", "link":"http://drunkjcrew.tumblr.com"}, | |
{"title": "Drunk J Crew", "image": "http://i.imgur.com/XKkITfW.jpg", "link":"http://drunkjcrew.tumblr.com"}, | |
{"title": "Drunk J Crew", "image": "http://i.imgur.com/XKkITfW.jpg", "link":"http://drunkjcrew.tumblr.com"}, | |
{"title": "Drunk J Crew", "image": "http://i.imgur.com/XKkITfW.jpg", "link":"http://drunkjcrew.tumblr.com"} | |
] | |
} |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Oceanic Next (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"fold_buttons": false, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", |
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
(ns verbs.core | |
(:require [clojure.data.csv :as csv] | |
[clojure.java.io :as io]) | |
(:gen-class)) | |
(def types { | |
:verb "so" | |
:pronoun "pfn" | |
:adjective "lo" | |
:number "to" |
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
public abstract class ViewModel : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
[NotifyPropertyChangedInvocator] | |
protected void RaisePropertyChanged([CallerMemberName] string propertyName = string.Empty) | |
{ | |
if (propertyName = string.Empty) | |
{ | |
throw new NotSupportedException("Cannot raise property changed on an empty property name. Make sure you are using the C# 5 compiler to make CallerMemberName work.") |
OlderNewer