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
Description: (SO0062) - Distributed Load Testing on AWS is a reference architecture to perform application load testing at scale. Version v3.2.3 | |
AWSTemplateFormatVersion: "2010-09-09" | |
Metadata: | |
AWS::CloudFormation::Interface: | |
ParameterGroups: | |
- Label: | |
default: Console access | |
Parameters: | |
- AdminName | |
- AdminEmail |
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
FROM alpine:latest | |
WORKDIR /app | |
COPY . /app | |
ENTRYPOINT [ "ash", "entry.sh" ] |
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
var goroutineID uint64 | |
// Go is a simple replacement for `go` keyword, but returns its ID. | |
// Go also passes the goroutine ID to function `f`. | |
// Only use it when you want to use the ID attached with function `f` executed by a goroutine. | |
// Otherwise, just use nornal `go` keyword. | |
func Go(f func(goroutineID uint64)) uint64 { | |
id := atomic.AddUint64(&goroutineID, 1) | |
go f(id) | |
return id |
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
- Algorithmic complexity / Big-O / Asymptotic analysis | |
- Data Structures | |
- Arrays | |
- Linked Lists | |
- Stack | |
- Queue | |
- Hash table | |
- More Knowledge | |
- Binary search | |
- Sorting |
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 | |
# Simple tool to check probation of given URL | |
# using cURL with HTTP GET method. | |
url=$1 | |
TXT_RED='\033[0;31m' | |
TXT_GREEN='\033[0;32m' | |
# check until pressing Ctr+C |
##Working configuration to accomplish 0-downtime deploy with unicorn 5.x and systemd on centos 7
The scope is to accomplish a 0-downtime reload of a unicorn service managed by Systemd on a Centos 7 distro.
The examples and assumptions that i found on the bogomips's unicorn repo seems not working for centos 7.
Below a working configuration tested on Centos 7 and unicorn 5.1
Any advice/remark will be appreciated
- install xcode command line:
xcode-select --install
- install mysql
brew install [email protected]
(i dont want to install mysql 8)
- export some compiling flag: (as show in
brew info [email protected]
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
- bundle install again
bundle install
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 main | |
import ( | |
"fmt" | |
) | |
type A struct { | |
val int | |
} |
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
type sequenceIDGenerator struct { | |
idMgrClient IDManagerClient // client for getting IDPrefix | |
preGenerateIDs chan string // pre-generated ids | |
} | |
// Pre-generate id and send to channel. | |
// This method should be called once and only once when init generator | |
func (g *sequenceIDGenerator) preGenIDs() { | |
var idBase, id string | |
var seq uint64 |
NewerOlder