Skip to content

Instantly share code, notes, and snippets.

View wyaeld's full-sized avatar
🐣
work in progress

Brad Murray wyaeld

🐣
work in progress
View GitHub Profile
@mlex
mlex / BurstyBackPressureTest.java
Created June 15, 2016 08:06
Test to demonstrate backpressure handling of reactor WorkQueueProcessor with bursty producers
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.LongAccumulator;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.FluxEmitter;
import reactor.core.publisher.WorkQueueProcessor;
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@isogram
isogram / wkhtmltopdf_wkhtmltoimage.md
Created April 8, 2016 09:50
How to manually install Wktohtmlpdf and Wkhtmltoimage in Ubuntu Server

How to Install Wkhtmltopdf and Wkhtmltoimage in Ubuntu

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf  /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage  /usr/bin/wkhtmltoimage
@pySilver
pySilver / 10_ansible_vault_check.py
Created January 29, 2016 19:42
Pre-commit check for ansible-vault encrypted files
#!/usr/bin/env python
import sys
import os
import re
import subprocess
def git(args, **kwargs):
environ = os.environ.copy()
if 'repo' in kwargs:
# Reference:
https://www.cloudgear.net/blog/2015/5-minutes-kubernetes-setup/
# install homebrew and cask
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
#!/usr/bin/env python
# This is a trick, to output the bash commands we need to run in shell, and just execute this script inside an eval within our shell, so it imports what we need
# Possibly tie this in with https://gist.github.com/mbainter/b38a4cb411c0b5c1bae6 for MFA support
# Will need to durably store MFA access tokens, possibly in some other env vars
# Could also store all different keys/info in different vars, to reuse as needed (lots of env vars though, file may be better)
import os
import sys
import getpass
@psahni
psahni / rails_logging.md
Last active February 18, 2016 19:28
Rails Production with logging
@simon-engledew
simon-engledew / tsung.xml
Created March 19, 2015 11:45
Tsung 1.5 + Rails Authenticity Token + URI encoding
<!-- You need to transform Val from a binary to a list and back again -->
<setdynvars sourcetype="eval" code="fun({Pid,DynVars})->
{ok, Val} = ts_dynvars:lookup(authenticity_token, DynVars),
list_to_binary(http_uri:encode(binary_to_list(Val)))
end.">
<var name="escaped_authenticity_token" />
</setdynvars>