Skip to content

Instantly share code, notes, and snippets.

View keroxp's full-sized avatar

Yusuke Sakurai keroxp

View GitHub Profile
@keroxp
keroxp / dvorak-jp-sakura.txt
Last active September 3, 2022 13:31
DvorakJP桜ローマ字変換テーブル
- ー
~ 〜
. 。
, 、
;/ ・
;- 〜
;[ 『
;] 』
[ 「
] 」
@keroxp
keroxp / SecureValues.cs
Last active October 5, 2018 06:55
Data holder class for secure value.
/*
The MIT License (MIT)
Copyright (c) 2017 Yusuke Sakurai / @keroxp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@keroxp
keroxp / BaseFragment.kt
Last active June 27, 2016 08:12
Fragment that logs lifecycle event.
import android.app.Activity
import android.app.Fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
abstract class BaseFragment : Fragment() {
fun <O> Any.wrap(tag: String, body: () -> O): O {
@keroxp
keroxp / fixissu.js
Created January 9, 2016 10:48
GithubのIssueページからfixedコミットメッセージを生成するブックマークレット
javascript:prompt("",function(){ var a = document.title.match(/^(.+)?· Issue (#\d+)/); return "fixed " + a[2] +" " + a[1]; }());
require 'arduino_firmata'
arduino = ArduinoFirmata.connect ENV["ARDUINO"]
puts "Arduino connect!! (firmata version v#{arduino.version})"
i = 0
loop do
# 正弦波で温度差を分ける
sin = Math.sin(i*Math::PI/180.0)
p sin
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'eventmachine'
require 'em-rocketio-linda-client'
require 'arduino_firmata'
$stdout.sync = true
EM::run do
arduino = ArduinoFirmata.connect ENV["ARDUINO"], :eventmachine => true
puts "Arduino connect!! (firmata version v#{arduino.version})"
@keroxp
keroxp / Rakefile
Last active December 29, 2015 17:49
Rakefile for iOS CI build
import "farm.rake"
# デフォルトのタスクを記述
task :default => ["clean","build:all","test:all"]
# 必要があればプロジェクトとワークスペースのパス
# $PROJECT = "Hoge.xcodeproj"
# $WORKSPACE = "Hoge.workspace"
# デフォルトのビルドスキーム
@keroxp
keroxp / Grunt.md
Last active December 24, 2015 21:18

Grunt Memo

最高の夏合宿で教えてもらったNode.jsのタスクランナーGruntを使ってみた

What's Grunt?

Node.jsで作られたタスク自動化ツール

  • サーバーをたてる
  • 構文チェック
@keroxp
keroxp / iosimgresize.rb
Created May 21, 2013 12:52
フォルダ中の@2x画像をすべて縮小して非retina用画像にするスクリプト tiny script for resizing all reitna images in specified directory into non-retina images #USAGE ruby iosimgresize.rb DIR_NAME
# coding:utf-8
require "rubygems"
require "RMagick"
if !ARGV[0]
STDERR.puts "missing argument"
exit
end
@keroxp
keroxp / iosicon.rb
Created May 21, 2013 12:49
ひとつのファイルからiOSアプリのアイコンを全部作るRubyスクリプト tiny script for making ios app icons in all sizes #USAGE ruby iosicon.rb ICON_NAME
# coding:utf-8
require "rubygems"
require "RMagick"
if !ARGV[0]
STDERR.puts "missing argument"
exit
end