Skip to content

Instantly share code, notes, and snippets.

View setting_up_a_new_remote_git_repository.textile

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

cemo /
Created Jan 25, 2012 — forked from msosvi/
This is a wrapper class for SLF4J. It is used when EclipseLink messages need to be logged through SLF4J.
package org.eclipse.persistence.logging;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
cemo /
Created May 6, 2012 — forked from kimble/
Dropwizard instrumentation of Guice beans annotated with @timed
package com.developerb.dropbot;
import com.developerb.dropbot.instrumentation.MethodInvocationTimingInterceptor;
import com.yammer.metrics.annotation.Timed;
import static;
import static;
cemo / ketchup-bootstrap.js
Created May 9, 2012 — forked from plecong/ketchup-bootstrap.js
jQuery Ketchup with Twitter Bootstrap
View ketchup-bootstrap.js
!function( $ ) {
"use strict"
.createErrorContainer(function(form, el) {
var g = el.closest('.controls');
if (g) {
cemo / gist:3197136
Created Jul 29, 2012 — forked from ehoch/gist:3189712
writecapture2 mutex
View gist:3197136
var mutex = false;
function load_ads()
if (mutex) {
setTimeout("load_ads()", 100); // try again in 100 ms?
mutex = true;
if (!$('#pushdown').html()) {
cemo /
Created Aug 15, 2012 — forked from kimble/
JUnit @rule for running Dropwizard integration test. Ps! This is just a proof of concept. There are probably some landminds lying around waiting to go off, especially around lifecycle management and static state
package com.developerb.dropwizard;
import com.yammer.dropwizard.AbstractService;
import com.yammer.dropwizard.Service;
import com.yammer.dropwizard.cli.Command;
import com.yammer.dropwizard.config.Configuration;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.junit.After;
import org.junit.Before;
package com.example.helloworld.resources;
import javax.jws.WebMethod;
name = "AddNumbersPortType",
serviceName = "AddNumbersService",
targetNamespace = "")
style = javax.jws.soap.SOAPBinding.Style.DOCUMENT,
cemo / gist:3842008
Created Oct 5, 2012 — forked from christophercurrie/gist:3841860
Guice for Dropwizard
View gist:3842008
public ServletContainer getJerseyContainer(DropwizardResourceConfig resourceConfig,
MyServiceConfig serviceConfig) {
// I like having a root module, but you can use as many as you like
final Injector injector = Guice.createInjector(new MyServiceModule(serviceConfig));
return new GuiceContainer(injector) {
public ResourceConfig getDefaultResourceConfig(Map<String,Object> props, WebConfig webConfig) {
cemo / rate_limit.js
Created Nov 21, 2012 — forked from mattheworiordan/rate_limit.js
Rate limiting function calls with JavaScript and Underscore.js
View rate_limit.js
/* Extend the Underscore object with the following methods */
// Rate limit ensures a function is never called more than every [rate]ms
// Unlike underscore's _.throttle function, function calls are queued so that
// requests are never lost and simply deferred until some other time
// Parameters
// * func - function to rate limit
// * rate - minimum time to wait between function calls
// * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request