:=
sets a setting to a new value
+=
appends a single value to a setting
++=
appends a collection of values to a setting
<<=
sets a setting to the value/result of another setting/context
<+=
appends a single value/result of another setting/context to this setting
<++=
appends a collection of values/results of another setting/context to this setting
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.datasift.playback | |
import java.util.concurrent.Executors | |
class RunnableWithShutdown extends MyRunnable { | |
@volatile | |
var isShutDown = false | |
override def shutdown() { isShutDown = 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
#!/bin/bash | |
######################################################################################## | |
# This will not build a full dockerfile, but will give a good hint to how it was build # | |
######################################################################################## | |
docker history --no-trunc "$1" | \ | |
sed -n -e 's,.*/bin/sh -c #(nop) \(MAINTAINER .*[^ ]\) *0 B,\1,p' | \ | |
head -1 | |
docker inspect --format='{{range $e := .Config.Env}} |
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
#! /usr/bin/env python | |
############################################################### | |
# In your .bashrc/.zshrc add `eval $(python <path to script>)` | |
# Or simply run `eval $(python <path to script>)` | |
# This avoids adding your aws credentials to bash/zsh history | |
############################################################### | |
import os, sys | |
from ConfigParser import ConfigParser |
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 SampleDatabase._ | |
import slick.jdbc.H2Profile.api._ | |
import kamon.Kamon | |
import scala.concurrent.{Await, ExecutionContext, Future} | |
import scala.concurrent.duration._ |
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
kamon { | |
statsd { | |
hostname = "metrics" | |
port = 8125 | |
flush-interval = 1 seconds | |
time-units = "ms" | |
subscriptions { | |
jdbc = [ "**" ] | |
} | |
} |
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
// Metrics reporter | |
val kamonVersion = "0.6.6" | |
val kamonJdbc = "io.kamon" %% "kamon-jdbc" % kamonVersion | |
val kamonAutoweave = "io.kamon" %% "kamon-autoweave" % kamonVersion | |
val slick = Seq( | |
"com.typesafe.slick" %% "slick" % "3.2.0" | |
, "com.typesafe.slick" %% "slick-hikaricp" % "3.2.0" | |
) |
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
## Checkout all branches from remote as tracking branches. Based on https://stackoverflow.com/questions/379081/track-all-remote-git-branches-as-local-branches/6300386#6300386 | |
UPSTREAM=$1 | |
MYREPO=$2 | |
usage() { | |
echo "Usage:" | |
echo "$0 <upstream-remote> <target-remote>" | |
echo "" | |
echo "Example which ensures remote named 'maxandersen' have all the same branches and tags as 'origin'" |
I hereby claim:
- I am jairamc on github.
- I am jairamc (https://keybase.io/jairamc) on keybase.
- I have a public key ASDH90X6-FniXaRsg0al0-W5Ns_bV8gqBWvc6RmV5xfw_wo
To claim this, I am signing this object:
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
# Modified version of https://gist.github.com/schwa/5907109 | |
import os | |
import subprocess | |
import glob | |
from github import Github # pip install PyGithub | |
from pybitbucket.bitbucket import Client # pip install pybitbucket | |
from pybitbucket.auth import BasicAuthenticator | |
from pybitbucket.repository import Repository, RepositoryPayload, RepositoryType, RepositoryForkPolicy |
OlderNewer