This file contains 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
// https://download.eclipse.org/microprofile/microprofile-metrics-2.2/microprofile-metrics-spec-2.2.html#_application_metric_registry | |
@Inject | |
@RegistryType(type = MetricRegistry.Type.BASE) | |
MetricRegistry baseRegistry; |
This file contains 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
defmodule LoadGenerator do | |
import AssertionHelper | |
import LogHelper | |
import RestHelper | |
def run(users_num) do | |
Enum.map(1..users_num, fn(x) -> Task.async(fn -> make_user() end)end) | |
|> Enum.map(fn(task) -> Task.await(task, 1_000_000) end) | |
end |
This file contains 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
deployment: | |
- name: my-environment-deployment | |
properties: | |
region: us-central1 | |
zone: us-central1-f | |
networks: | |
- name: "my-network" | |
properties: | |
routingConfig: | |
routingMode: REGIONAL |
This file contains 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
digraph G { | |
layout=dot; | |
labeljust=l; | |
color=white; | |
internet [ | |
label=<<table border="0"><tr><td fixedsize="true" width="32" height="32"><img src="gcp/internet.png" /></td><td>Internet</td></tr></table>>, | |
shape=record, color=black, style = "filled", fillcolor=white |
This file contains 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
# click login | |
DISPLAY=:0 xdotool mousemove -- 1150 25 | |
DISPLAY=:0 xdotool click 1 | |
# login | |
## user name | |
DISPLAY=:0 xdotool mousemove -- 1200 320 | |
DISPLAY=:0 xdotool click 1 | |
DISPLAY=:0 xdotool type "User Name" |
This file contains 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
func scan(str string)[]string { | |
var head []string | |
var tail string | |
if str == "" { | |
return []string{} | |
}else{ | |
x := string(str[0]) | |
switch x { | |
case "'": |
This file contains 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
irb(main):132:0> str | |
=> "a b 'c d' e" | |
irb(main):133:0> scan(str) | |
=> ["a", "b", "c d", "e"] |
This file contains 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" | |
import "os" | |
import "os/exec" | |
import "net/http" | |
func main() { | |
port := os.Args[1] | |
script := os.Args[2] |
This file contains 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
(1..100).map do |i| | |
case [i % 3, i % 5] | |
in [0, 0] | |
"FizzBuzz" | |
in [0, _] | |
"Fiz" | |
in [_, 0] | |
"Buzz" | |
else | |
i.to_s |
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package cn.orz.pascal.tinybench; | |
import java.io.IOException; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |