http://collectiveidea.com/blog/archives/2016/01/08/postgresql95-upgrade-with-homebrew/
Upgrade Postgres (9.5):
brew update && brew upgrade postgres
Then let’s stop the old installation (but don’t load up the new one yet).
#!/bin/sh | |
if git-rev-parse --verify HEAD >/dev/null 2>&1; then | |
against=HEAD | |
else | |
# run against initial commit | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
for FILE in `git diff-index --check --name-status $against -- | cut -c3-` ; do |
http://collectiveidea.com/blog/archives/2016/01/08/postgresql95-upgrade-with-homebrew/
Upgrade Postgres (9.5):
brew update && brew upgrade postgres
Then let’s stop the old installation (but don’t load up the new one yet).
master
branch is always production-ready, deployable, 100% green test suitegit pull
is configured to automatically rebase)(ns erdos-c.core | |
[:require [yokogiri.core :refer :all]]) | |
(def client (make-client :javascript false)) | |
(defn page [uri] | |
(get-page client (str "http://en.wikipedia.org" uri))) | |
(defn link-snippets [uri] | |
(xpath (page uri) "//a")) |
package com.acme.logging | |
import akka.actor.Actor | |
import akka.event.EventHandler | |
import akka.event.slf4j.{Logger, Logging} | |
class MySlf4jEventHandler extends Actor with Logging { | |
import EventHandler._ | |
self.id = ID |
import sbt._ | |
import Keys._ | |
import Defaults._ | |
//adding the Artifacts.settings to you project settings will create and publish the artifact defined as 'theMainArtifact' | |
object Artifacts { | |
val allTheArtifacts = TaskKey[Seq[(sbt.Artifact, java.io.File)]]("all-artifacts") | |
val theMainArtifact = TaskKey[File]("zip-artifact", "Create zip with all library dependencies") | |
val artifactConf = config("Artifact") hide //use this to scope the create artifact to this config |
object CoffeePot extends App { | |
ComponentRegistry.coffeeWarmer.trigger | |
} | |
trait OnOffDevice { | |
def on: Unit | |
def off: Unit | |
} | |
trait SensorDevice { |
//harry huang [huanghui.huang@gmail.com] | |
// | |
//After reading the original post [http://jboner.github.com/2008/10/06/real-world-scala-dependency-injection-di.html, ] | |
//the original cake pattern seems quite verbose for me, and it is quite invasive, so I spent a bit time | |
//and come up with an improved version of cake pattern, which I call it "Auto Cake DI". It is working | |
//well with any POST(plain old scala trait)/POSO(plain old scala object) which means that anything can be | |
//injected without modification or introducing new traits. | |
/*---------inject trait---------*/ | |
trait Inject[+T] { def inject: T } |
import sbt._ | |
import Keys._ | |
import org.sbtidea._ | |
import SbtIdeaPlugin._ | |
import Scope.{GlobalScope, ThisScope} | |
object BuildSettings { | |
val buildOrganization = "com.mojolly.backchat" | |
val buildScalaVersion = "2.9.0-1" | |
val buildVersion = "0.8.1-SNAPSHOT" |