// 2024 Update, use URLSearchParams [https://caniuse.com/urlsearchparams] | |
export function createQueryString2(name: string, value: string, searchParams: any) { | |
const params = new URLSearchParams(searchParams); | |
params.set(name, value.toLowerCase()); | |
return params.toString(); | |
} | |
// ---- Original 2012 version, when browsers really sucked ---- | |
// Explicitly save/update a url parameter using HTML5's replaceState(). |
This is a very simply routing system that makes it easy to test requests to different paths. This is very limited so do not use for your applications - it's just for fun.
require('route.php');
// A user profile
route('/(\w+)/profile', function($path, $user)
{
print "Hello " . $user;
## FastCGI | |
server { | |
location ~ /app.* { | |
fastcgi_pass 127.0.0.1:9000; | |
include fastcgi_params; | |
} | |
} | |
## Reverse Proxy (이 방식으로 하면 http.ListenAndServe로 해야함) | |
server { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Iframe</title> | |
</head> | |
<body> | |
<button>Botão</button> | |
<script type="text/javascript"> |
resource "digitalocean_droplet" "haproxy-www" { | |
image = "ubuntu-14-04-x64" | |
name = "haproxy-www" | |
region = "nyc2" | |
size = "512mb" | |
private_networking = true | |
ssh_keys = [ | |
"${var.ssh_fingerprint}" | |
] | |
connection { |
This is my response to an email asking about Domain-Driven Design in golang project.
Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.
That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.
Conclusions could be very different, if there was a different project, team or a story-teller.
The *.txt files here hold user and database parameters. Specifically, replication.txt
contains the user/role and password to use for replication. Whereas database.txt
contains an initial database, user/role and password to create on the master.
Run the master:
$ fig run -d master
Wait for it to start up completely. Start the slave:
First, read the CoreOS page on ECS:
https://coreos.com/docs/running-coreos/cloud-providers/ecs/
Install the aws commandline tool:
which aws || pip install awscli
Make sure you have your AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
defined in your shell environment.