Skip to content

Instantly share code, notes, and snippets.

Marc Esher marcesher

Block or report user

Report or block marcesher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pig.log
at java.lang.String.intern()Ljava/lang/String; (Native Method)
at clojure.lang.Symbol.intern(Ljava/lang/String;)Lclojure/lang/Symbol; (
at clojure.lang.Keyword.intern(Ljava/lang/String;)Lclojure/lang/Keyword; (
at clojure.core$keyword.invoke(Ljava/lang/Object;)Ljava/lang/Object; (core.clj:574)
at$get_data_table$fn__4180$fn__4181.invoke(Ljava/lang/Object;)Ljava/lang/Object; (data.clj:176)
at clojure.core$map$fn__4207.invoke()Ljava/lang/Object; (core.clj:2485)
at clojure.lang.LazySeq.sval()Ljava/lang/Object; (
at clojure.lang.LazySeq.seq()Lclojure/lang/ISeq; (
at clojure.lang.ChunkedCons.chunkedNext()Lclojure/lang/ISeq; (
marcesher / gist:9863995
Created Mar 29, 2014
View gist:9863995
if [[ $1 == *.go ]]
goimports -w $1

These are questions about browser testing and state.

Imagine a large suite of browser tests that intend to deeply regression test an application. Like most web apps, this involves different types of state: user permissions, expected data in a database, etc. Testing the application requires logging in as different users and/or user types to test different views into the data.

  1. What are patterns for creating expected state prior to running browser tests?
  2. Is it appropriate for the browser tests to communicate directly with the database of the system under test, creating state in the same manner that you would in an integration test?
  3. How important is it that browser tests be decoupled from the application under test, such that the only thing required to run tests are the tests themselves, which can be pointed at any applicable URL (dev, test, staging)?
marcesher /
Last active Aug 29, 2015
Strange hanging behavior with python httplib in one environment only
# Problem: In only one environment, I see behavior with httplib where issuing a request against a FQDN will hang, but works fine with a URL without the domain
# eg request("GET", "") hangs, but request("GET", "/") does not
# I only see this problem in one of our hosting environments, on both 2.6 and 2.7
# I cannot replicate it anywhere else
import httplib
cn = httplib.HTTPConnection("", 80, timeout=5)
package edu.gmu.mut;
import java.util.ArrayList;
import java.util.Calendar;
* Class Account represents an immutable customer account.
public class Account {
marcesher / BadObject.cfc
Created Jan 12, 2012
cfc with no var scoping
View BadObject.cfc
component output="false"{
function loop1(){
x = 1;
for( x = 1; x LTE 100; x++ ){
writeLog("x is #x#");
return x;
marcesher / gist:1662639
Created Jan 23, 2012
Synthesizing functions in javascript... practical applications?
View gist:1662639
From David Laing & Greg Malcolm's excellent javascript koans. I'm wondering: What are practical uses cases for this function synthesizing in javascript, where this approach would be preferable to all other possible approaches:
it("should use lexical scoping to synthesise functions", function () {
function makeIncreaseByFunction(increaseByAmount)
var increaseByFunction = function increaseBy(numberToIncrease)
return numberToIncrease + increaseByAmount;
marcesher / eff_you_var_scope
Created Feb 25, 2012
How many concurrent requests does it take to get into the throw?
View eff_you_var_scope
<cffunction name="getArtist" output="false" access="public" returntype="any" hint="">
<cfargument name="id" type="numeric" required="true"/>
<cfquery datasource="cfartgallery" name="artist">
select *
from artists
where artistid = <cfqueryparam value="" cfsqltype="cf_sql_integer"/>
marcesher / ChatService.groovy
Created Aug 20, 2012
websocket chat example
View ChatService.groovy
class ChatService {
static transactional = false
static atmosphere = [mapping: '/atmosphere/chatty']
marcesher / ChatService.groovy
Created Sep 4, 2012
websocket broadcaster example
View ChatService.groovy
class ChatService {
static transactional = false
static atmosphere = [mapping: '/atmosphere/chat']
You can’t perform that action at this time.