- [Why Functional Programming Matters][whyfp]
- [Applicative Programming with Effects][app]
- [The Essence of the Iterator Pattern][iter]
- [Generalising Monads to Arrows][arrows]
package com.googlecode.furnace.analyse.blast; | |
import static com.googlecode.instinct.expect.Expect.expect; | |
import com.googlecode.instinct.integrate.junit4.InstinctRunner; | |
import com.googlecode.instinct.internal.util.instance.ObjectFactory; | |
import com.googlecode.instinct.marker.annotate.BeforeSpecification; | |
import com.googlecode.instinct.marker.annotate.Dummy; | |
import com.googlecode.instinct.marker.annotate.Mock; | |
import com.googlecode.instinct.marker.annotate.Specification; | |
import com.googlecode.instinct.marker.annotate.Subject; |
CmdUtils.CreateCommand({ | |
name: "showmore", | |
takes: {"url to shorten": noun_arb_text}, | |
preview: "Replaces the selected URL with ashowmore.info shortened URL.", | |
description: "Replaces the selected URL with a bit.ly-shortened URL.", | |
icon: "http://bit.ly/favicon.png", | |
execute: function( urlToShorten ) { | |
var baseUrl = "http://showmore.info/links/"; | |
var params = {link_url: urlToShorten.text}; | |
jQuery.get(baseUrl, params, function(shortenedUrl) { |
# sans destructive update | |
def f(rss, n) | |
rss.inject(0) {|acc, rs| rs.include?(n) ? acc + 1 : acc} | |
end | |
I upgraded from Snow Leopard.
Git went missing, so I downloaded the .dmg and installed it: http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.6-x86_64-snow-leopard.dmg&can=2&q=
Uninstalled my current devtools: sudo /Developer/Library/uninstall-devtools
Installed Xcode via the App Store.
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
package com.vast.example | |
import java.net.InetSocketAddress | |
import java.util.UUID | |
import java.util.concurrent.{Executors, TimeUnit} | |
import com.google.common.base.Splitter | |
import com.twitter.finagle.http.Http | |
import com.twitter.finagle.builder.{Server, ServerBuilder} | |
import com.twitter.finagle.service.TimeoutFilter | |
import com.twitter.finagle.{Service, SimpleFilter, GlobalRequestTimeoutException} |