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
// what I'd like to do | |
def primaryOperation(): Unit = { | |
// blah | |
// blah | |
val triforce = makeTriforce | |
val complexObject = new ComplexObject( | |
firstParam = somethingelse | |
secondParam = triforce._1 | |
thirdParm = snakes |
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
curl -v https://api.sportsdatallc.org/mlb-t4/schedules/2014.json\?api_key\=[VALID_API_KEY] | |
* Adding handle: conn: 0x7fdb3b804000 | |
* Adding handle: send: 0 | |
* Adding handle: recv: 0 | |
* Curl_addHandleToPipeline: length: 1 | |
* - Conn 0 (0x7fdb3b804000) send_pipe: 1, recv_pipe: 0 | |
* About to connect() to api.sportsdatallc.org port 443 (#0) | |
* Trying 23.23.158.219... | |
* Connected to api.sportsdatallc.org (23.23.158.219) port 443 (#0) | |
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
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
class SomeController { | |
private func loadOfferSummaries() -> Void { | |
api.fetchOfferSummaries( { either in | |
switch either { | |
case let .Failure(boxedError): | |
NSLog("Failure fetching games, code --> \(boxedError.value.code)") | |
// mock out test data | |
self.offers = self.mockOfferSummaries() | |
self.loadTable() | |
case let .Success(boxed): |
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 bash | |
SESSION_NAME="" | |
tmux has-session -t $SESSION_NAME &> /dev/null | |
if [ $? -ne "0" ] | |
then | |
tmux new-session -d -s $SESSION_NAME | |
tmux split-window -h -p 40 | |
tmux split-window -v -p 40 | |
tmux send-keys -t 0 "vim" C-m |
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
package io.finch | |
import argonaut._, Argonaut._ | |
import com.twitter.finagle.httpx.path.Path | |
package object client { | |
implicit def decodeStrResource: DecodeResource[String] = new DecodeResource[String] { | |
def apply(r: Resource): String = r.body | |
} |
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
//In this case, we are decoding a type `Teams` from a third party service | |
//If `Teams` has any elements, the presented JSON is an Array of `Team` | |
//If `Teams` is empty, is is suppoed to be Optional. However, sometimes when `Teams` is empty the service returns an empty JSON object | |
import argonaut._, Argonaut._ | |
case class Team(id: Int, name: String) | |
object Team { | |
implicit val decodeTeamJson: DecodeJson[Team] = { DecodeJson(h => for { |
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
package com.twitter.finagle.dispatch | |
import com.twitter.finagle.context.Contexts | |
import com.twitter.finagle.tracing.{Annotation, Trace} | |
import com.twitter.finagle.transport.Transport | |
import com.twitter.finagle.{Service, NoStacktrace, CancelledRequestException} | |
import com.twitter.util._ | |
import java.util.concurrent.atomic.AtomicReference | |
import scala.collection.mutable.ListBuffer |
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
git status | grep deleted | awk '{print $3}' | xargs git rm |
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
tar -jvcf email-xml-pairs.tar.bz2 /path/to/base |
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
tar -jvcf email-xml-pairs.tar.bz2 /path/to/base |
OlderNewer