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
#! /bin/sh | |
docker run --name tmp-mysql -d --rm \ | |
-p 13306:3306 \ | |
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=tmp -v $(pwd):/fixture mysql:5.6.45 \ | |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --sql-mode=TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY --secure-file-priv="" | |
while ! mysqladmin ping -s -u root -P 13306 -h 0.0.0.0; do | |
printf . | |
sleep 1 | |
done | |
echo "" |
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
font: | |
normal: | |
family: Ricty for Powerline | |
style: Regular | |
bold: | |
family: Ricty for Powerline | |
style: Bold | |
italic: | |
family: Ricty for Powerline | |
style: Italic |
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
{{- $alias := .Aliases.Table .Table.Name -}} | |
{{- $schemaTable := .Table.Name | .SchemaTable}} | |
// UpsertAll upserts all rows with the specified column values, using an executor. | |
func (o {{$alias.UpSingular}}Slice) UpsertAll({{if .NoContext}}exec boil.Executor{{else}}ctx context.Context, exec boil.ContextExecutor{{end}}, columns boil.Columns) error { | |
ln := int64(len(o)) | |
if ln == 0 { | |
return nil | |
} | |
var sql string |
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 bench | |
import org.openjdk.jmh.annotations._ | |
import impl.Impl._ | |
@BenchmarkMode(Array(Mode.Throughput)) | |
@Warmup(iterations = 40, time = 3) | |
@Measurement(iterations = 40, time = 3) | |
@Fork(1) | |
class Bench { |
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
lazy val root = (project in file(".")). | |
settings( | |
libraryDependencies ++= Seq( | |
"com.github.xuwei-k" %% "msgpack4z-core" % "0.3.9", | |
"com.github.xuwei-k" %% "msgpack4z-native" % "0.3.5" | |
) | |
) |
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
{"lastUpload":"2019-08-01T06:58:24.465Z","extensionVersion":"v3.2.9"} |
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
fn main() { | |
let user_dao = UserMockDao {}; | |
let post_dao = PostMockDao {}; | |
let app = App { user_dao, post_dao }; | |
println!("{:?}", app.get_user_by_id(2)); | |
app.show_by_id(1); | |
app.show_by_id(2) | |
} | |
pub type Result<T> = std::result::Result<T, Box<std::error::Error>>; |
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
Show hidden characters
{ | |
"presets": ["env"], | |
"plugins": ["transform-runtime", "transform-async-generator-functions"] | |
} |
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" | |
"os" | |
"ghe.ca-tools.org/leicester/auction.git/rdb" | |
"github.com/facebookgo/inject" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/go-xorm/xorm" |
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
/* @flow */ | |
type Article = { | |
id: string | |
} | |
type State = { | |
articles: Article[] | |
} | |
const state: State = { |
NewerOlder