-
First get to the existing directory
$ cd my/folder/ -
Now start a new git repository
$ git init -
Identify if the current elements on the directory are needed or not and add them to the .gitignore file. When ready...
$ vim .gitignore -
When ready create the first commit on the server
| sealed trait TreeLike[M[_]] { | |
| def node[A](f: M[A], g: M[A]): M[A] | |
| } | |
| sealed trait Tree[+A] { self => | |
| def flatMap[B](f: A => Tree[B]): Tree[B] = self match { | |
| case Leaf(a) => f(a) | |
| case Node(l, r) => Node(l.flatMap(f), r.flatMap(f)) | |
| } | |
| } |
| package models; | |
| import java.util.*; | |
| import javax.persistence.*; | |
| import com.avaje.ebean.Expr; | |
| import com.avaje.ebean.Query; | |
| import org.codehaus.jackson.annotate.JsonIgnore; | |
| import org.codehaus.jackson.annotate.JsonProperty; | |
| import play.data.validation.Constraints; |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
Asynchronicity is the price to pay, you better know what you're paying for...
Let's share some vocabulary first:
Thread: The primitive responsible of executing code on the processor, you can give an existing (or a new) Thread some code, and it will execute it. Normally you can have a few hundreds on a JVM, arguments that you can tweak your way out to thousands. Worth noting that multitasking is achieved when using multiple Threads. Multiple Threads can exist for a single processor in which case multitasking happens when this processor switches between threads, called context switching, which will give the impression of things happenning in parallel. An example of a direct, and probably naive, use of a new Thread in Java:
public class MyRunnable implements Runnable {
public void run(){
System.out.println("MyRunnable running");| Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_11). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> trait Meep { type Moop; def f: Moop } | |
| defined trait Meep | |
| scala> def fnord(a: Meep): a.Moop = a.f | |
| fnord: (a: Meep)a.Moop |
| # to install the latest stable version: | |
| brew install play | |
| # to install play-2.1-RC3: | |
| # if you already have a version of play installed you will need to unlink it. | |
| brew unlink play | |
| brew install https://raw.github.com/gist/4675514/play.rb | |
| # to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
| brew switch play 2.0.4 |
| Hello scala, my old friend | |
| I've come to take you home again | |
| Because a feature slowly creeping | |
| left me plagued with doubts and weeping | |
| and the version that was tagged in the repo | |
| just has to go | |
| it lacks the signs of soundness | |
| On sleepless nights I hacked alone | |
| applying ant and other tools of stone |
| # to install the latest stable version: | |
| brew install play | |
| # to install play-2.1-RC2: | |
| brew install https://raw.github.com/gist/4485598/play.rb | |
| # to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
| brew switch play 2.0.4 | |
| brew switch play 2.1-RC2 |
| trait Semigroup[A] { | |
| def op(a1: A, a2: A): A | |
| } | |
| trait Monoid[A] extends Semigroup[A] { | |
| def id: A | |
| } | |
| object Monoid { | |
| implicit def ListMonoid[A]: Monoid[List[A]] = |