Skip to content

Instantly share code, notes, and snippets.

View navono's full-sized avatar
:octocat:
I may be slow to respond.

Darkness navono

:octocat:
I may be slow to respond.
View GitHub Profile
@navono
navono / README.md
Created March 18, 2019 10:59 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

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 March 26, 2019 01:35 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@navono
navono / dockertags
Created April 22, 2019 08:10
获取指定镜像的所有 tag
#!/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 02:17
parse json with jq in shell
// {
// "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 02:24
create cpp output with protoc
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 07:27
create image that compile proto files
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
automake \
build-essential \
git \
libtool \
make \
npm \
wget \
@navono
navono / file.sh
Created June 11, 2019 01:44
extract file name related info
#!/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 June 12, 2019 00:28
add prefix string in list
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.sh
Last active June 13, 2019 05:29
proto shell 编译脚本
#! /bin/bash
# test.sh
PROTOC_GEN_TS_PATH=$(pwd)/node_modules/.bin/protoc-gen-ts.cmd
# Directory to write generated code to
OUT_DIR="./generated"
JS_DIR=$OUT_DIR/js
GO_DIR=$OUT_DIR/go
SWAGGER_DIR=$OUT_DIR/swagger
@navono
navono / gracefulStop.go
Created June 18, 2019 06:34
Golang graceful stop
package main
import (
"os"
"os/signal"
"syscall"
"fmt"
"time"
"net/http"
)
func main() {