$ gem install aws-sdk fake-s3
$ fakes3 -r /tmp/fakes3 -p 4567
Loading FakeS3 with /tmp/fakes3 on port 4567 with hostname s3.amazonaws.com
[2013-07-31 17:52:34] INFO WEBrick 1.3.1
[2013-07-31 17:52:34] INFO ruby 2.0.0 (2013-06-27) [x86_64-darwin12.4.0]
[2013-07-31 17:52:34] INFO WEBrick::HTTPServer#start: pid=34539 port=4567
This file contains hidden or 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.yourkit.probes.*; | |
import com.yourkit.api.*; | |
@MethodPattern("scala.tools.nsc.Global$Run:advancePhase()") | |
public class MemoryProbe { | |
public static void onEnter(@This scala.tools.nsc.Global.Run run) { | |
scala.reflect.internal.Phase patmatPhase = run.phaseNamed("patmat"); | |
scala.reflect.internal.Phase postErasurePhase = run.phaseNamed("posterasure"); | |
scala.reflect.internal.Phase icodePhase = run.phaseNamed("icode"); |
This file contains hidden or 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
if [[ $BUILD_STATUS == "success" ]] | |
then | |
export STATUS="success" | |
else | |
export STATUS="failure" | |
fi | |
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \ | |
-H "Content-Type: application/json" \ | |
-X POST \ |
This file contains hidden or 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 java.util.Properties | |
import kafka.server.KafkaServer | |
import kafka.server.KafkaConfig | |
import kafka.producer.ProducerConfig | |
import kafka.producer.Producer | |
import kafka.message.Message | |
import kafka.producer.ProducerData | |
import kafka.consumer.ConsumerConfig | |
import kafka.consumer.Consumer | |
import kafka.utils.Utils |
This file contains hidden or 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
#ifndef WIN32_NO_STATUS | |
# define WIN32_NO_STATUS | |
#endif | |
#include <windows.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <winerror.h> | |
#include <stddef.h> | |
#include <winnt.h> | |
#include <limits.h> |
This file contains hidden or 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 example | |
import java.util.concurrent.ConcurrentHashMap | |
import java.util.concurrent.ConcurrentLinkedQueue | |
import com.typesafe.config.Config | |
import com.typesafe.config.ConfigFactory | |
import akka.actor.Actor | |
import akka.actor.ActorContext | |
import akka.actor.ActorRef | |
import akka.actor.ActorSystem |
This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.
I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial
(it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.
def local_cache(box_name)
cache_dir = File.join(File.expand_path(Vagrant::Environment::DEFAULT_HOME),
'cache',
'apt',
box_name)
This file contains hidden or 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
#! /bin/bash | |
set -e | |
SCALA_DEV=~/code/scala | |
HASH=`git --git-dir $SCALA_DEV/.git rev-list "$1" | head -n1` | |
DESC=`git --git-dir $SCALA_DEV/.git describe $HASH` | |
shift | |
DIR=~/usr/scala-$DESC | |
SCALA=$DIR/pack/bin/scala |
This file contains hidden or 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
-dontwarn org.jboss.netty.logging.** | |
-dontwarn org.osgi.** | |
-dontwarn javax.servlet.** | |
-dontwarn org.jboss.netty.channel.socket.http.** | |
## Unsafe is there at runtime | |
-dontwarn sun.misc.Unsafe | |
-keep class sun.misc.Unsafe{ | |
*; | |
} |