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
# Mac rxvt-unicode setup. | |
# http://rcrowley.org/articles/rxvt-unicode.html | |
# Install dependencies from MacPorts and CPAN. | |
sudo port install rxvt-unicode +xterm_colors_256 | |
sudo port install terminus-font | |
sudo cpan install Mac::Pasteboard | |
# Run urxvt at X11 startup. | |
defaults write org.x.X11 app_to_run /opt/local/bin/urxvt |
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
# =================================================================== | |
# COMMON SPRING BOOT PROPERTIES | |
# | |
# This sample file is provided as a guideline. Do NOT copy it in its | |
# entirety to your own application. ^^^ | |
# =================================================================== | |
# ---------------------------------------- | |
# CORE PROPERTIES | |
# ---------------------------------------- |
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
Request NO GZIP: | |
curl http://localhost:8080/customers/1111 --silent --write-out "%{size_download}\n" --output /dev/null | |
Request GZIP: | |
curl http://localhost:8080/customers/1111 --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/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
ab -n 1000 -c 10 http://www.google.com/ |
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
@FunctionalInterface | |
public interface ObjectEntitySetter extends Consumer<ObjectEntity> {} | |
public static ObjectEntity build(ObjectEntitySetter... ObjectEntitySetters) { | |
final ObjectEntity object = new ObjectEntity(); | |
Stream.of(ObjectEntitySetters).forEach( | |
s -> s.accept(object) | |
); | |
return 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
Docker in MAC | |
https://docs.docker.com/installation/mac/ | |
Create an image | |
sudo docker build -t eif_accounts . | |
Run image |
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
git fetch upstream | |
git merge upstream/master | |
Reference: | |
https://help.github.com/articles/syncing-a-fork/ |
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.paddypower.financials.market.management.rest.logging; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
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
wget http://repo1.maven.org/maven2/com/github/tomakehurst/wiremock/1.57/wiremock-1.57-standalone.jar | |
chmod a+x wiremock.jar | |
java -jar wiremock-1.57-standalone.jar --port 9999 | |
curl -X POST --data '{ "request": { "url": "/recaptcha-mock?secret=&response=&remoteip=", "method": "GET" }, "response": { "status": 200, "body": "{ \"success\" : true }" }}' http://localhost:9999/__admin/mappings/new | |
curl -X POST --data '{ "request": { "url": "/recaptcha-mock", "method": "GET", "queryParameters": { "remoteip": { "contains": "" }, "response": { "contains": "" }, "secret": { "contains": "" } }, "url": "/recaptcha-mock" } } }, "response": { "status": 200, "body": "{ \"success\" : true }" }}' http://localhost:9999/__admin/mappings/new |
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
# define some variables | |
variable "aws_ubuntu_ami" { | |
default = "ami-972444ad" | |
} | |
variable "aws_keypair" { | |
default = "xxxx" | |
} | |
# AWS account details |
OlderNewer