This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.kyonmm.webapi | |
| import groovy.sql.Sql | |
| import org.junit.Test | |
| import java.sql.Date | |
| class Select { | |
| @Test | |
| void selectFromENEX(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package userguide | |
| import spock.lang.Specification | |
| class WhenJottingDownTask extends Specification{ | |
| def "依頼されたタスクをメモ書きしてあとで見直してから着手してタスクが終わったら消す"(){ | |
| given:"ツールをインストールする" | |
| User.installJot() | |
| when:"チャット上でなにか依頼されて、コンソールでメモする" | |
| def requestedTask = User.receiveTaskOnChat() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = kyonmm | |
| email = [email protected] | |
| [core] | |
| editor = emacsclient | |
| quotepath = true | |
| [difftool "sourcetree"] | |
| cmd = /Applications/p4merge.app/Contents/MacOS/p4merge \"$LOCAL\" \"$REMOTE\" | |
| path = | |
| [merge] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !#/bin/sh | |
| echo 1 | |
| # /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| 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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |