Go to https://github.com/bpholt/git-template instead
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
for (node in hudson.model.Hudson.instance.slaves.take(100)) { | |
println(node.name) | |
node.getComputer().setTemporarilyOffline(true,null); | |
node.getComputer().doDoDelete(); | |
} | |
println(hudson.model.Hudson.instance.slaves.size()); | |
for (node in hudson.model.Hudson.instance.slaves.take(10)) { | |
computer = node.getComputer(); | |
if(computer != null && computer.isOffline()) { |
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 com.dwolla.http.finagle | |
import com.twitter.finagle.Http.Client | |
import com.twitter.finagle.http.{Method, Request, Response} | |
import com.twitter.finagle.loadbalancer.LoadBalancerFactory | |
import com.twitter.finagle.{Http, Service} | |
object FinagleHttpClient { | |
private def newService(dest: String): Service[Request, Response] = { |
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 | |
cluster=default | |
container_instance= # container instance guid | |
tasks=$(aws --region us-west-2 ecs list-tasks --container-instance $container_instance --cluster $cluster | jq -r '.taskArns | map(.[40:]) | reduce .[] as $item (""; . + $item + " ")') | |
for task in $tasks; do | |
aws --region us-west-2 ecs stop-task --task $task --cluster $cluster | |
done | |
aws --region us-west-2 ecs deregister-container-instance --cluster $cluster --container-instance $container_instance |
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
docker inspect $(docker ps -q) | \ | |
jq 'map(.Config.Env | | |
map(select((. | startswith("SERVICE")) and | |
(. | startswith("SERVICE_IGNORE") | not)))) | | |
reduce .[] as $item ([]; . + $item)' |
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/sh | |
aws ecs describe-container-instances \ | |
--region ${REGION} \ | |
--cluster ${CLUSTER} \ | |
--container-instances $(aws ecs list-container-instances \ | |
--region ${REGION} \ | |
--cluster ${CLUSTER} | \ | |
jq -r '.containerInstanceArns | | |
map(match("container-instance/(.*)").captures[].string)[]') | \ |
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 akka.testkit.TestActorRef | |
object TestActorHelpers { | |
def queueMessagesTo(pausedActor: TestActorRef[Nothing])(sendMessages: => Unit) = { | |
pausedActor.suspend() | |
sendMessages | |
pausedActor.resume(null) | |
} | |
} |
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
lazy val pipeline = TaskKey[Unit]("pipeline", "Runs the full build pipeline: compile, test, integration tests") | |
pipeline <<= (test in IntegrationTest).dependsOn(test in Test) |
I hereby claim:
- I am bpholt on github.
- I am bpholt (https://keybase.io/bpholt) on keybase.
- I have a public key whose fingerprint is 525E 6B7F 3661 69C0 DA65 06EF 9F39 C3CD 3382 E6FC
To claim this, I am signing this object:
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
touch ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist |