start new:
tmux
start new with session name:
tmux new -s myname
| Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_21). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> class Prefix { class Dep { type P = Prefix.this.type } } | |
| defined class Prefix | |
| scala> val (p1, p2) = (new Prefix, new Prefix) | |
| p1: Prefix = Prefix@2212c414 | |
| p2: Prefix = Prefix@7e070e85 |
| import scala.language.experimental.macros | |
| import scala.reflect.macros.Context | |
| import shapeless._ | |
| object NatExample { | |
| def toNat(n: Int): Any = macro toNat_impl | |
| def toNat_impl(c: Context)(n: c.Expr[Int]) = { | |
| import c.universe._ |
| { | |
| "_links": { | |
| "self": { | |
| "href": "/v4/events/24057" | |
| }, | |
| "http://hautelook.com/rels/catalog": { | |
| "href": "/v4/events/24057/catalog" | |
| }, | |
| "http://hautelook.com/rels/availability": { | |
| "href": "/v4/events/24057/availability" |
| module Main where | |
| import Control.Applicative ((<*>)) | |
| import Data.Semigroup ((<>)) -- http://hackage.haskell.org/package/semigroups | |
| import Data.Maybe (fromMaybe, listToMaybe, maybe) | |
| import System.Environment (getArgs) | |
| import Data.Lens.Partial.Common(getorPL, headLens) -- http://hackage.haskell.org/package/data-lens | |
| fizzbuzz :: | |
| Integral a => |
| ########################################## | |
| # | |
| # c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 | |
| # | |
| # Version 2.82 | |
| # | |
| # Latest Change: | |
| # - MORE tweaks to get the iOS 10+ and 9- working | |
| # - Support iOS 10+ | |
| # - Corrected typo for iOS 1-10+ (thanks @stuikomma) |
| #!/usr/bin/python | |
| # fix-xcode | |
| # Rob Napier <[email protected]> | |
| # Script to link in all your old SDKs every time you upgrade Xcode | |
| # Create a directory called /SDKs (or modify source_path). | |
| # Under it, put all the platform directories: | |
| # MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
| # Under those, store the SDKs: |
These examples are type 3 RESTful API requests and responses. The JSON-HAL specification is used to implement HATEOAS.
Some of the examples are based on my work as architect of the RESTful API at http://www.hautelook.com. All proprietary information has been removed.
| package code.mockweb | |
| /* | |
| * Copyright 2011 WorldWide Conferencing, LLC | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |