Skip to content

Instantly share code, notes, and snippets.

View wang-zhijun's full-sized avatar

WANG ZHIJUN wang-zhijun

  • Tokyo
View GitHub Profile
@wang-zhijun
wang-zhijun / client.go
Created December 8, 2016 01:29 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@wang-zhijun
wang-zhijun / numpy.md
Last active November 15, 2016 13:12
NumPy

Install NumPy

brew install python3

# Get access to the scientific Python formulas
brew tap Homebrew/python

# Install Numpy and Matplotlib
brew install numpy --with-python3
@wang-zhijun
wang-zhijun / circleci.md
Last active October 26, 2016 00:41
CircleCI

The circle.yml file is made up of six primary sections. Each section represents a phase of running your tests:

  • machine:

  • adjusting the VM to your preferences and requirements

  • checkout:

  • checking out and cloning your git repo

  • dependencies:

  • setting up your project’s language-specific dependencies

@wang-zhijun
wang-zhijun / rabbitmq.md
Last active October 28, 2016 02:14
RabbitMQ

RabbitMQのManagement pluginを有効に

# rabbitmq-plugins enable rabbitmq_management

Vhostを追加

# rabbitmqctl add_vhost /athena

Vhostを削除

@wang-zhijun
wang-zhijun / mongodb.md
Last active February 7, 2017 05:15
MongoDB

Collectionの一覧を取得

> use athena
> db.auth("test_id", "test_id")
> db.getCollectionNames()

リモートのMongoDBに接続

@wang-zhijun
wang-zhijun / postgresql.md
Last active October 17, 2016 06:39
PostgreSQL

テーブルの一覧を表示

\dt

ユーザー一覧を表示

\du

The only mandatory claim for an unencrypted JWT header is the alg claim, for unencrypted JWTs this claim must be set to the value none.

Optional header claims include the typ and cty claims.

For unencrypted JWTs, the header is simply:

{
    "alg": "none"
}
@wang-zhijun
wang-zhijun / lets_encrypt.md
Last active October 27, 2016 07:17
Let's encrypt

Renew

30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log


NginxにSSl証明書を適応させる

@wang-zhijun
wang-zhijun / golang_echo_frame.md
Last active October 6, 2016 01:25
Golang Echo Web Frame

Install

go get -u github.com/labstack/echo
@wang-zhijun
wang-zhijun / elm.md
Last active October 4, 2016 08:19
Elm
$ cat Hello.elm
module Hello exposing (..)

import Html exposing (text)

main =
    text "Hello"