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 checkout $1 | |
git pull origin $1 | |
git tag $1.final | |
git checkout master | |
git branch -d $1 | |
git push origin --tags :$1 |
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
registerStudent(student, new HandlerChain<RegistrationStep>() | |
.on(RegistrationStep.NEW_STUDENT, new FlexibleHandler() { | |
void handle(NewRegistrant registrant) { | |
System.out.println(registrant.info()); | |
} | |
}) | |
.on(RegistrationStep.USER_EXISTS, new FlexibleHandler() { | |
void handle(NewRegistrant registrant, UserContainer existingUser) { | |
System.out.println(registrant.info()); | |
System.out.println(existingUser.info()); |
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
import redis.clients.jedis.Jedis; | |
import redis.clients.jedis.JedisPool; | |
public class RedisResource extends TryWithResource<Jedis> { | |
private final JedisPool pool; | |
public RedisResource(JedisPool pool) { | |
this.pool = pool; | |
} |
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
public interface ContextAware<T> { | |
void beforeMethod(AtomicReference<T> context); | |
} |
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
import com.amazonaws.AmazonClientException; | |
import com.amazonaws.AmazonServiceException; | |
import com.amazonaws.AmazonWebServiceRequest; | |
import com.amazonaws.ResponseMetadata; | |
import com.amazonaws.regions.Region; | |
import com.amazonaws.services.sqs.AmazonSQS; | |
import com.amazonaws.services.sqs.model.*; | |
import com.google.common.hash.Hashing; | |
import java.util.*; |
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.studyblue.utils.pool; | |
import java.lang.ref.ReferenceQueue; | |
import java.lang.ref.WeakReference; | |
import java.util.IdentityHashMap; | |
import java.util.Map; | |
import java.util.Queue; | |
import java.util.concurrent.ArrayBlockingQueue; |
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
public class JSInvocable { | |
private final Invocable invocable; | |
private final Object object; | |
private JSInvocable(Invocable invocable, Object object) { | |
this.invocable = invocable; | |
this.object = object; | |
} | |
public String invoke(String method, Object...args) { |
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
/** | |
* Base class for command line applications. | |
* | |
* Children can provide functionality in the form of | |
* <command name> <arguments...> | |
* | |
* @author Ben Fagin | |
*/ | |
class GroovyCLI implements Runnable { | |
private String[] args; |
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
module Jekyll | |
class LessCssFile < StaticFile | |
def write(dest) | |
# do nothing | |
end | |
end | |
class LessJsGenerator < Generator | |
safe true |
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
javascript:(function()%7B(function%20()%20%7Bvar%20jsCode%20%3D%20document.createElement('script')%3BjsCode.setAttribute('src'%2C%20'https%3A%2F%2Fraw.github.com%2Fgist%2F3769415%2Fslcal.js')%3Bdocument.body.appendChild(jsCode)%3B%7D())%7D)() |