Skip to content

Instantly share code, notes, and snippets.

:octocat:
I may be slow to respond.

Darkness navono

:octocat:
I may be slow to respond.
Block or report user

Report or block navono

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@navono
navono / etcd3-demo.go
Created Mar 15, 2019
A demo for etcd3 golang client
View etcd3-demo.go
package main
import (
"context"
"fmt"
"log"
"strconv"
"time"
"github.com/coreos/etcd/clientv3"
@navono
navono / README.md
Created Mar 18, 2019 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻
View README.md

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@navono
navono / introrx.md
Created Mar 26, 2019 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
@navono
navono / dockertags
Created Apr 22, 2019
获取指定镜像的所有 tag
View dockertags
#!/bin/bash
if [ $# -lt 1 ]
then
cat << HELP
dockertags -- list all tags for a Docker image on a remote registry.
EXAMPLE:
- list all tags for ubuntu:
@navono
navono / jsonParser.sh
Created May 21, 2019
parse json with jq in shell
View jsonParser.sh
// {
// "sync": true,
// "machines": [
// {
// "name": "1911-1",
// "address": "192.168.1.14",
// "user": "administrator",
// "passwd": "supcon_1",
// "path": "C:\\AppDev"
// },
@navono
navono / protoc-gen-cpp.sh
Created May 22, 2019
create cpp output with protoc
View protoc-gen-cpp.sh
protoc -Iapi/proto/v1 -Ithird_party --grpc-cpp_out=cmd/client-rest-cpp/api/v1 --cpp_out=cmd/client-rest-cpp/api/v1 --plugin=protoc-gen-grpc-cpp="C:\\Program Files (x86)\\grpc\\bin\\grpc_cpp_plugin.exe" todo-service.proto
protoc -Ithird_party --plugin=protoc-gen-grpc-cpp="C:\\Program Files (x86)\\grpc\\bin\\grpc_cpp_plugin.exe" --cpp_out=cmd/client-rest-cpp/api/v1 third_party/google/api/annotations.proto
protoc -Ithird_party --plugin=protoc-gen-grpc-cpp="C:\\Program Files (x86)\\grpc\\bin\\grpc_cpp_plugin.exe" --cpp_out=cmd/client-rest-cpp/api/v1 third_party/google/api/http.proto
protoc -Ithird_party --plugin=protoc-gen-grpc-cpp="C:\\Program Files (x86)\\grpc\\bin\\grpc_cpp_plugin.exe" --cpp_out=cmd/client-rest-cpp/api/v1 third_party/protoc-gen-swagger/options/annotations.proto
protoc -Ithird_party --plugin=protoc-gen-grpc-cpp="C:\\Program Files (x86)\\grpc\\bin\\grpc_cpp_plugin.exe" --cpp_out=cmd/client-rest-cpp/api/v1 third_party/protoc-gen-swagger/options/openapiv2.proto
@navono
navono / Dockerfile
Created May 22, 2019
create image that compile proto files
View Dockerfile
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
automake \
build-essential \
git \
libtool \
make \
npm \
wget \
@navono
navono / file.sh
Created Jun 11, 2019
extract file name related info
View file.sh
#!/bin/bash
fullfilename=$1
filename=$(basename "$fullfilename")
fname="${filename%.*}"
ext="${filename##*.}"
echo "Input File: $fullfilename"
echo "Filename without Path: $filename"
echo "Filename without Extension: $fname"
@navono
navono / prefix.sh
Created Jun 12, 2019
add prefix string in list
View prefix.sh
MYLIST=(var1 var2 var3)
echo ${MYLIST[@]/#/my_}
# Output: my_var1 my_var2 my_var3
DATABASE="database1"
IGNORE_TABLES=(table1 table2 table3)
echo mysqldump ${IGNORE_TABLES[@]/#/--ignore-table=${DATABASE}.} ${DATABASE}
# Output: mysqldump --ignore-table=database1.table1 --ignore-table=database1.table2 --ignore-table=database1.table3 database1
@navono
navono / protoc.cmd
Last active Jun 20, 2019
使用 batch 编译 proto 文件
View protoc.cmd
@ECHO OFF
REM 声明采用UTF-8编码
chcp 65001
echo "请先安装 Golang 和 protoc,然后安装 protoc 插件"
REM plugin binary path
set PROTOC_GEN_TS_PATH=%cd%\\bin\\node_modules\\.bin\\protoc-gen-ts.cmd
set PROTOC_GEN_GRPC_PATH=%cd%\\bin\\grpc_cpp_plugin.exe
set PROTOC_GEN_LINT_PATH=%cd%\\bin\\protoc-gen-lint.exe
You can’t perform that action at this time.