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.exports = function( grunt ) { | |
'use strict'; | |
// | |
// Grunt configuration: | |
// | |
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md | |
// | |
grunt.initConfig({ | |
// Project configuration |
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.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'); |
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
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 |
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
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) -> |
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
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 |
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
#!/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 |
NewerOlder