- 1/4 cup of sugar
- 1/4 cup of flour
- 2 tbsp of cocoa
- a pinch of salt
- 2 tbsp of olive oil
- 3 tbsp of water
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RedEyes generates rich descriptions of the API, as well as valid examples for | |
* all parameters (in this case, example header, query parameter, and content). | |
* | |
* The API can also be used to generate client libraries in a variety of languages. | |
* | |
* Service handlers are strongly-typed (e.g. retrieveEmployees expects an integer | |
* and a ModelDesc). Any errors in using the API automatically generate rich | |
* descriptions on what was expected. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/https' | |
module SecurityModule | |
class HighSecurity | |
class ReallyHighSecurity | |
def self.turn_on_safe_connections | |
OpenSSL::SSL::VERIFY_NONE | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exedir="/usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4" | |
exeprog="ghc-stage2" | |
executablename="$exedir/$exeprog" | |
datadir="/usr/local/Cellar/ghc/7.0.4/share" | |
bindir="/usr/local/Cellar/ghc/7.0.4/bin" | |
topdir="/usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4" | |
pgmgcc="/usr/bin/llvm-gcc" | |
extraopts=-optl"-Wl,-read_only_relocs,suppress" | |
executablename="$exedir/ghc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stap | |
global samples | |
global all_samples | |
global timestamp | |
probe process("node").mark("gc__start") | |
{ | |
timestamp = gettimeofday_us() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Zip together a couple Futures, including one that returns an Option | |
// and pass them to a function to give me a new object: | |
api.channels.tree zip api.pages.getByRoute(route) map { | |
case (tree, Some(page)) => Some(new PagePresenter(context, tree, page)) | |
case _ => None | |
} | |
// Now with an Applicative Functor! | |
(api.channels.tree |@| api.pages.getByRoute(route)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.mutable.ListBuffer | |
import akka.actor.{Actor,ActorRef} | |
import akka.actor.Actor._ | |
import akka.routing.{ Listeners, Listen } | |
//Represents a domain event | |
trait Event | |
//A builder to create domain entities | |
trait EntityBuilder[Entity] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "DES encryption in Scala" | |
version := "1.0" | |
scalaVersion := "2.9.1" | |
libraryDependencies += "commons-codec" % "commons-codec" % "1.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, config, ... }: | |
{ | |
imports = [ | |
<nixpkgs/nixos/modules/profiles/headless.nix> | |
]; | |
# Enable sudo logins if the user's SSH agent provides a key | |
# present in <filename>~/.ssh/authorized_keys</filename>. | |
# This allows machines to exclusively use SSH keys instead of | |
# passwords. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Part Zero : 10:15 Saturday Night | |
* | |
* (In which we will see how to let the type system help you handle failure)... | |
* | |
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0) | |
*/ | |
import scalaz._ | |
import Scalaz._ |
OlderNewer