Skip to content

Instantly share code, notes, and snippets.

@kobayashi
kobayashi / client.py
Created March 19, 2019 04:28
responder with websocket
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import asyncio
import websockets
async def client():
async with websockets.connect('ws://127.0.0.1:5042/ws') as websocket:
await websocket.send("KOBAYASHI")
response = await websocket.recv()

Keybase proof

I hereby claim:

  • I am kobayashi on github.
  • I am kay1 (https://keybase.io/kay1) on keybase.
  • I have a public key whose fingerprint is 46E1 C89A 7C3F D586 C52C 374C EB88 3F3C 0B11 F8E1

To claim this, I am signing this object:

@kobayashi
kobayashi / config.yml
Created September 15, 2018 02:47
Sample cofig.yml for testing gobuffalo
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.10
- image: circleci/postgres:10.5-alpine-postgis-ram
environment:
@kobayashi
kobayashi / main.go
Last active October 23, 2016 15:20
understand underscore
package main
import “fmt”
func main() {
s := []int{10, 20, 30, 40, 50, 60, 70, 80, 90}
fmt.Println(“--------\nindexWithValue\n--------“)
indexWithValue(s)
fmt.Println(“--------\nindexOnly\n--------“)
indexOnly(s)
fmt.Println(“--------\nvalueOnly\n--------“)
valueOnly(s)