Skip to content

Instantly share code, notes, and snippets.

Kyon MM kyonmm

Block or report user

Report or block kyonmm

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
View game-of-yukko-life.py
class LifeGame:
def __init__(self, width, hight):
rows = []
for x in range(width):
row = []
for y in range(hight):
row.append(0)
rows.append(row)
self.cells = rows
def print_cells(self):
View results.adoc

Request

Header

x-api-key=foo

Body

{"id":"5001"}

Response

Header

x-api-key=foo

@kyonmm
kyonmm / websocket.xml
Created Nov 26, 2018 — forked from georgeOsdDev/websocket.xml
Tsungによるwebsocket負荷テスト(日本語説明付き)
View websocket.xml
<!--
http://george-osd-blog.heroku.com/25
http://george-osd-blog.heroku.com/26
-->
<?xml version="1.0"?>
<!-- インストールしたTsungのPathとあっていること -->
<!DOCTYPE tsung SYSTEM "/home/ec2-user/opt/tsung-latest/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
@kyonmm
kyonmm / Example.groovy
Created Jun 18, 2018
groovyc Example.groovy && java -cp "groovy-all-2.4.13.jar;." Example
View Example.groovy
import java.util.concurrent.ConcurrentHashMap
def a = new ConcurrentHashMap();
for (int i = 0; i < 1000000; i++) {
a.put(UUID.randomUUID().toString(), UUID.randomUUID().toString())
}
println ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024))
def t = new Thread(new Runnable() {
View setup-mac.sh
!#/bin/sh
echo 1
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
View ultrasonic-python.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, time, requests, json, hcsr04
# you can specify interval(seconds) as first argument
interval=5 if len(sys.argv)==1 else int(sys.argv[1])
# inifinite loop
while True:
start_time = time.time()
View gist:365617087bd9258f1dd8604f9b7b9d54
[user]
name = kyonmm
email = kyon.mm@gmail.com
[core]
editor = emacsclient
quotepath = true
[difftool "sourcetree"]
cmd = /Applications/p4merge.app/Contents/MacOS/p4merge \"$LOCAL\" \"$REMOTE\"
path =
[merge]
View WhenJottingDownTask.groovy
package userguide
import spock.lang.Specification
class WhenJottingDownTask extends Specification{
def "依頼されたタスクをメモ書きしてあとで見直してから着手してタスクが終わったら消す"(){
given:"ツールをインストールする"
User.installJot()
when:"チャット上でなにか依頼されて、コンソールでメモする"
def requestedTask = User.receiveTaskOnChat()
View select.groovy
package org.kyonmm.webapi
import groovy.sql.Sql
import org.junit.Test
import java.sql.Date
class Select {
@Test
void selectFromENEX(){
@kyonmm
kyonmm / selectFromEverNote.groovy
Created Nov 20, 2014
C:\Users\hoge\AppData\Local\Evernote test 201411
View selectFromEverNote.groovy
@Grab('org.xerial:sqlite-jdbc:[3.7.2,)')
@GrabConfig(systemClassLoader=true)
import groovy.sql.Sql
def home = args[0]
def tag = args[1]
def date = args[2]
Class.forName("org.sqlite.SQLite")
You can’t perform that action at this time.