Update: I made this a proper blog post
- linux box
package lib.data | |
import play.api.db.slick.Config.driver.simple._ | |
// Inspired by: http://bit.ly/HL0y7u | |
private[data] trait DAO extends ReviewersComponent with ProposalsComponent with ValuationsComponent { | |
val Reviewers = new Reviewers | |
val Proposals = new Proposals | |
val Valuations = new Valuations | |
} |
#!/bin/sh | |
index=$1 | |
find . -name \*.bulk.gz | while read i; do | |
gzip -cd $i | curl -XPOST localhost:9200/${index}/_bulk -d@- >/dev/null | |
done | |
Update: I made this a proper blog post
The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.
The easiest way to use this script is to simply clone the gist onto your
This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js
See source code on GitHub: pixelhandler/journal.
Initial clean compile of entire project: | |
[info] [info] Compiling 29 Scala sources and 1 Java source to /tmp/inc-compile/target/scala-2.10/classes... | |
[info] [success] Total time: 15 s, completed Aug 28, 2013 9:43:38 PM | |
Now simulate adding a method to a controller: | |
[info] [info] Compiling 1 Scala source to /tmp/inc-compile/target/scala-2.10/classes... | |
[info] [success] Total time: 2 s, completed Aug 28, 2013 9:43:40 PM | |
Now simulate adding a new route to the routes file: | |
[info] [info] Compiling 2 Scala sources and 1 Java source to /tmp/inc-compile/target/scala-2.10/classes... |
import ch.qos.logback.classic.Level | |
import ch.qos.logback.classic.Logger | |
import ch.qos.logback.classic.LoggerContext | |
import ch.qos.logback.classic.encoder.PatternLayoutEncoder | |
import ch.qos.logback.classic.joran.JoranConfigurator | |
import ch.qos.logback.core.ConsoleAppender | |
import grails.util.Environment | |
import org.apache.commons.logging.Log | |
import org.apache.commons.logging.LogFactory | |
import org.slf4j.LoggerFactory; |
[alias] | |
up = "pull --rebase" | |
pullmerge = "pull --no-rebase" | |
subup = "!f() { git submodule sync; git submodule update --init --recursive; }; f" | |
subreset = "submodule foreach 'git reset --hard HEAD'" | |
who = shortlog -s -- | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
info = remote -v | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
package main | |
import "fmt" | |
import "log" | |
import "encoding/json" | |
import "time" | |
import "github.com/mattbaird/elastigo/api" | |
import "github.com/mattbaird/elastigo/core" | |
type Person struct { |
echo "Deleting old ElasticSearch index..." | |
curl -XDELETE 'localhost:9200/arrtest' | |
echo "Creating new ElasticSearch index..." | |
curl -XPUT 'localhost:9200/arrtest/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"cust2" : { | |
"properties" : { | |
"firstName" : { |