-
Add to
.gitignore
:node_modules public
-
Add to your app
dependencies
ofpackage.json
:
#!/usr/bin/env zsh | |
# Change "Mongal" in text to name of your collection. | |
DATADIR="$HOME/Documents/data" | |
mkdir -p $DATADIR/db/{config,logs,0,1,2,3} | |
mkdir $DATADIR/backup | |
cd $DATADIR/db/logs | |
touch 0.log 1.log 2.log 3.log config.log main.log | |
chmod 666 *.log |
import com.cloudera.crunch._ | |
import com.cloudera.scrunch._ | |
class ScrunchWordCount { | |
def wordCount(inputFile: String, outputFile: String) = { | |
val pipeline = new Pipeline[ScrunchWordCount] | |
pipeline.read(from.textFile(inputFile)) | |
.flatMap(_.toLowerCase.split("\\W+")) | |
.filter(!_.isEmpty()) | |
.count |
fs = require 'fs' | |
# Usage: coffee replace-to-dashes.coffee src/**/* | |
replaceFile = (path) -> | |
fs.readFile path, (error, data) -> | |
return console.log error if error? | |
result = data | |
.toString() | |
.replace /([a-z])([A-Z])([a-z])/g, ($0, $1, $2, $3) -> |
routes = require './routes' | |
# Execute handler on document ready event. | |
jQuery -> | |
# Initialise new Chaplin application. | |
# Specify controller suffix for clarity. | |
new Chaplin.Application | |
controllerSuffix: '-controller', pushState: false, routes: routes |
module.exports = function ( grunt ) { | |
/** | |
* Load required Grunt tasks. These are installed based on the versions listed | |
* in `package.json` when you do `npm install` in this directory. | |
*/ | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); |
module.exports = function( grunt ) { | |
'use strict'; | |
// | |
// Grunt configuration: | |
// | |
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md | |
// | |
grunt.initConfig({ | |
// Project configuration |
# Ruby’s “method missing” analog with ES6 proxies. | |
proxify = (object) -> | |
new Proxy object, get: (receiver, name) -> | |
object[name] ? object.methodMissing.bind object, name | |
object = proxify | |
a: 1, | |
b: 15, | |
c: -> | |
'called' |
Add to .gitignore
:
node_modules
public
Add to your app dependencies
of package.json
:
data Cargo = Peasant | |
| Cabbage | |
| Wolf | |
| Goat | |
deriving (Eq, Enum, Show) | |
type ShoreState = [Cargo] | |
type Move = [Cargo] | |
type State = (ShoreState, ShoreState) |
.border-radius (@radius) { | |
-webkit-border-radius: @radius; | |
-o-border-radius: @radius; | |
-moz-border-radius: @radius; | |
-ms-border-radius: @radius; | |
border-radius: @radius; | |
} | |
.user-list { | |
// need to use special `.` syntax |