Skip to content

Instantly share code, notes, and snippets.

View yangchenyun's full-sized avatar

Steven Yang yangchenyun

View GitHub Profile
@yangchenyun
yangchenyun / test.py
Created January 29, 2022 10:00
Test cases
minibox_scenarios = [
"<1.2.3",
">=1.2.3 AND <1.3.8",
"==1.3.8",
]
system_patch_scenarios = [
"brand_new_box", # never applied any system patch
"used_box", # has applied some system patch, but not all
"updated_box", # has applied all system patches
@yangchenyun
yangchenyun / minibox.yaml
Created January 4, 2022 06:51
Minibox Yaml Idea
{
"steps": [
{
"run": "cp -r /home/box/docker/minibox ",
"name": "backup"
},
{
"run": "cp -r /home/box/docker/minibox /home/box/docker/minibox/1_2_4-ota",
"name": "prepare new"
@yangchenyun
yangchenyun / scheme.json
Last active November 18, 2021 01:26
Logging Schema
{
"title": "Logging Schema",
"description": "Describe all the fields which would be indexed by the logging infrastructure.",
"required": [
"level",
"name",
"hostname",
"env",
"time",
"msg"
@yangchenyun
yangchenyun / calvin.json
Created October 25, 2021 07:49
Linkedin Profile Sample
{
"industryName": "Computer Software",
"lastName": "Feng",
"locationName": "United States",
"student": false,
"geoCountryName": "United States",
"geoCountryUrn": "urn:li:fs_geo:103644278",
"geoLocationBackfilled": false,
"elt": false,
"birthDate": {
openssl s_client -servername dev-zenoc.turingvideo.com -showcerts -connect dev-zenoc.turingvideo.com:443
CONNECTED(00000005)
depth=0 CN = *.turingvideo.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = *.turingvideo.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
@yangchenyun
yangchenyun / okr.org
Last active October 14, 2021 03:19
Turing_OKR

OKRs

Launch device management solutions to support operations for 30k+ devices

Deliver E2E on-demand OTA experience on mobile/web according to prod roadmap

Longxiang He Yang Song Zhongjie Chen

Deliver software to enable scheduled batch push OTA update.

Longxiang He Yang Song

@yangchenyun
yangchenyun / vote.json
Last active September 30, 2021 09:24
Voting result
"voters": [
{
"name": "Carl S",
"saw_poll_at": 1632974245048,
"unique_vote_token": 0.9393235830993898,
"voted_at": 1632974249247,
"votes": {
"-MkY6MA7d7o_yUIpqVsN": {
"value": 0
},
@yangchenyun
yangchenyun / test_auth.js
Created August 17, 2020 19:07
Test Authentication for JD
function UnauthorizedError(msg) {
return new Error(msg);
}
let runrule = function (user, context, callback) {
// do not restrict social login users
if (user.identities[0].isSocial){
return callback(null, user, context);
}
// if the user has meta data
@yangchenyun
yangchenyun / binding.json
Last active June 25, 2019 06:30
Reviewable_Shortcuts
[
["f", "Show next/latest diffs", "setProposedDiffBounds()"],
["n", "Next unreviewed file", "nextUnreviewedFile()"],
["p", "Previous unreviewed file", "prevUnreviewedFile()"],
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"],
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"],
["shift+n", "Next changed file", "nextChangedFile()"],
["shift+p", "Previous changed file", "prevChangedFile()"],
[null, "Next visible file", "nextVisibleFile()"],
[null, "Previous visible file", "prevVisibleFile()"],
@yangchenyun
yangchenyun / solution.go
Created May 23, 2019 00:26
Poker hands
// # Determine Winning Poker Hand
// Design a program to determine the winner of a
// [poker](https://en.wikipedia.org/wiki/Poker) game.
// The order of a card would be described as "23456789TJQKA", the suit of a card
// would be described as "HSCD" (**H**eart, **S**pade, **C**lub, **D**iamond). Each card
// would be presented by two characters, i.e. "9D", "KC" etc.
// You would be given a list of hands as a text file, each line represents a