Skip to content

Instantly share code, notes, and snippets.

(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"
{
"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",
{
"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"}
]
}
{
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());
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
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
// 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
};
},
// 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'),
@davidblurton
davidblurton / gist:9440434
Last active August 29, 2015 13:57
I wanted the index page to be a static page (which you can write in the Ghost editor) rather than the list of posts (which you can only edit by changing the template). Hacked the router so the index page redirects to a static page at /index
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);