Skip to content

Instantly share code, notes, and snippets.

View kuronekomichael's full-sized avatar
🤡
“You cheated not only the game, but yourself"

Koki Nakashima kuronekomichael

🤡
“You cheated not only the game, but yourself"
View GitHub Profile
#!/bin/bash
# [usage]
# instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument ...]]]
# --- 環境設定
APP_NAME=<TargetAppName>
# for 7.0.3-64
#SIMULATOR_VERSION=7.0.3-64
#GUID=9BAC4C3E-BBC2-4805-A115-A310CB21A941
@kuronekomichael
kuronekomichael / _helper.js
Last active August 29, 2015 14:02
mocha/chaiでテストを書くときにいつものセット(mocha.opts, _helper.js)
global.expect = require('chai').expect;
global.sinon = require('sinon').expect;
// clear console
process.stdout.write('\u001b[2J\u001b[0;0H');
require 'selenium-webdriver'
require 'eyes_selenium'
require 'rubygems'
eyes = Applitools::Eyes.new
# This is your api key, make sure you use it in all your tests.
eyes.api_key = 'LZaId14atU1nIA1MQIWqPwNQvWiskKuweYAx66D1rCQ110(仮)'
# Setup appium - Ensure the capabilities meets your environment.
# Refer to http://appium.io documentation if required.
#include "TrinketFakeUsbSerial.h"
void setup()
{
TFUSerial.begin();
}
void loop()
{
TFUSerial.task(); // this should be called at least once every 10 ms
@kuronekomichael
kuronekomichael / list.js
Created June 1, 2015 01:31
1時間以内に解けなければプログラマ失格となってしまう5つの問題が話題に Five programming problems every Software Engineer should be able to solve in less than 1 hour http://www.softantenna.com/wp/software/5-programming-problems/
// http://www.softantenna.com/wp/software/5-programming-problems/
var assert = require('assert');
//(1) forループ、whileループ、および再帰を使用して、リスト内の数字の合計を計算する3つの関数を記述せよ。
(function() {
function forSum(inputs) {
var sum = 0;
for (var i = 0; i < inputs.length; i++) {
sum += inputs[i];
@kuronekomichael
kuronekomichael / gist:1624253
Created January 17, 2012 02:52
Standard Initializer
- (id) init
{
self = [super init];
if (self != nil) {
// init code
}
return self;
}
<!-- sample -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="http://assets3.github.com/javascripts/bundle_gist.js"></script>
<link type="text/css" rel="stylesheet" href="https://github.com/stylesheets/bundle_common.css" />
<link type="text/css" rel="stylesheet" href="https://github.com/stylesheets/bundle_gist.css" />
@kuronekomichael
kuronekomichael / scaling_isomorphic_javascript_code.ja.markdown
Created August 30, 2012 05:01 — forked from tily/scaling_isomorphic_javascript_code.ja.markdown
サバクラ両方で動く JavaScript の大規模開発を行うために

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。

@kuronekomichael
kuronekomichael / uiautomation_js_reference.md
Last active November 27, 2015 09:14
UIAutomation JavaScript Reference

UIAutomation JavaScript Reference 日本語版

based on UIAutomationRef.pdf

Accessing and Using User Interface Elements

エレメントは階層構造になっている UIATarget.localTarget()を最上位とする

@kuronekomichael
kuronekomichael / ResourceParser.pm
Created December 12, 2015 11:50
簡易的なテキストファイルパーサー
package ResourceParser;
use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(read_csv_file);
sub read_csv_file {
my $filename = shift or die 'no such csv filepath';
my $key_label = shift or die 'no such csv keyword';
my $results = {};