I hereby claim:
- I am samstarling on github.
- I am samstarling (https://keybase.io/samstarling) on keybase.
- I have a public key ASAbCz8NP9AUlQvj5wngqAgkVDCt75RvHXctk8X6nvjbgAo
To claim this, I am signing this object:
| id | name | favourite_number | |
|---|---|---|---|
| 1 | Sam | 40 | |
| 2 | Foo | 12 | |
| 3 | Bar |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| package com.samstarling.futures | |
| import com.twitter.util.{Future, Await} | |
| import com.samstarling.util.time | |
| object ConcurrentComposition extends App { | |
| def slowTask(time: Int): Future[String] = Future { | |
| Thread.sleep(time) | |
| "Hello" |
| package com.samstarling.futures | |
| import com.twitter.util.Future | |
| object SequentialComposition extends App { | |
| case class User(name: String) | |
| def authenticate(credentials: String) = Future { Some(User("sam")) } |
| package com.distributed | |
| object Helpers { | |
| def maybe(chance: Double)(success: => Any)(failure: => Any) = { | |
| if(scala.util.Random.nextFloat() < chance) { | |
| success | |
| } else { | |
| failure | |
| } | |
| } |
| require 'json' | |
| class Hash | |
| def dig(*path) | |
| path.inject(self) do |location, key| | |
| location.respond_to?(:keys) ? location[key] : nil | |
| end | |
| end | |
| end |
| $(document).ready(function(){ | |
| $("#search").bind({ | |
| focus: function() { | |
| $(this).animate({ width:200 }, 300); | |
| }, | |
| blur: function() { | |
| $(this).animate({ width:90 }, 300); | |
| } | |
| }); | |
| }); |
| <?php | |
| // Generate a random number. | |
| $random = rand(0, 2); | |
| // Set up messages, and fetch a random one. | |
| $messages = array( | |
| array("heading" => "foo", "body" => "123"), | |
| array("heading" => "bar", "body" => "456"), | |
| array("heading" => "bad", "body" => "789") |
| bbcpasswd () { | |
| smbpasswd -U <name> -r `host -t srv _ldap._tcp.pdc._msdcs.national.core.bbc.co.uk | cut -d" " -f8 | head -c -2` | |
| } |