This gist is a collection of my rough notes from Strange Loop 2012.
This file contains hidden or 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
/* | |
Copyright 2012 Matthew Henderson | |
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 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
/** | |
* Garrick Evans | |
* 29 Dec 2010 | |
*/ | |
import akka.http._ | |
import akka.actor._ | |
import net.smartam.leeloo.client._ | |
import net.smartam.leeloo.client.request.OAuthClientRequest | |
import net.smartam.leeloo.client.response. {OAuthAuthzResponse, GitHubTokenResponse} |
This file contains hidden or 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 java.util.regex._ | |
import scala.xml._ | |
import org.mindrot.jbcrypt.BCrypt | |
import net.liftweb._ | |
import common._ | |
import http.S | |
import http.js._ | |
import json.JsonAST.{JNothing, JNull, JString, JValue} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.mongodb.mongod</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/mongodb/bin/mongod</string> | |
<string>run</string> |
This file contains hidden or 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
trait Enum { //DIY enum type | |
import java.util.concurrent.atomic.AtomicReference //Concurrency paranoia | |
type EnumVal <: Value //This is a type that needs to be found in the implementing class | |
private val _values = new AtomicReference(Vector[EnumVal]()) //Stores our enum values | |
//Adds an EnumVal to our storage, uses CCAS to make sure it's thread safe, returns the ordinal | |
private final def addEnumVal(newVal: EnumVal): Int = { import _values.{get, compareAndSet => CAS} | |
val oldVec = get |
This file contains hidden or 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
trait ActorSpecification extends BaseSpecification | |
with ArgumentsArgs | |
with ArgumentsShortcuts | |
with MustThrownMatchers | |
with ShouldThrownMatchers | |
with FormattingFragments | |
with StandardResults | |
with StandardMatchResults | |
with PendingUntilFixed | |
with TimeHelpers |
This file contains hidden or 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 java.util.concurrent.ConcurrentLinkedQueue | |
import java.util.concurrent.atomic.AtomicInteger | |
import scala.concurrent.ExecutionContext | |
import scala.util.control.NonFatal | |
import scala.annotation.tailrec | |
object SerializedExecutionContext { | |
def apply(batchSize: Int)(implicit context: ExecutionContext): ExecutionContext = { | |
require(batchSize > 0, s"SerializedExecutionContext.batchSize must be greater than 0 but was $batchSize") | |
new ConcurrentLinkedQueue[Runnable] with Runnable with ExecutionContext { | |
private final val on = new AtomicInteger(0) |
This Gist contains the script and generated output file for an Acer B276HUL.
The pre-generated file below is known to work with:
- OS X Mavericks
- OS X Yosemite
- OS X El Capitan
For El Capitan:
- Restart your Mac while holding Command-R: this puts your Mac into Recovery Mode.
In the following, replace the REPO_NAME
value with the natural-language name of your repository, replace REPOSITORY
with the domain name (e.g. repo1.maven.org
) and replace USERNAME
with your repository user.
credentials += {
val Password = """.*password: "([^"]+)".*""".r
var lines: String = ""
val logger = new ProcessLogger {
def info(s: => String) = {}
OlderNewer