Skip to content

Instantly share code, notes, and snippets.


Yusuke Sakurai keroxp

View GitHub Profile
keroxp / SecureValues.cs
Last active Oct 5, 2018
Data holder class for secure value.
View SecureValues.cs
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 / BaseFragment.kt
Last active Jun 27, 2016
Fragment that logs lifecycle event.
View BaseFragment.kt
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 / fixissu.js
Created Jan 9, 2016
View fixissu.js
javascript:prompt("",function(){ var a = document.title.match(/^(.+)?· Issue (#\d+)/); return "fixed " + a[2] +" " + a[1]; }());
View loop.rb
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
View main.rb
# -*- 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 / Rakefile
Last active Dec 29, 2015
Rakefile for iOS CI build
View Rakefile
import "farm.rake"
# デフォルトのタスクを記述
task :default => ["clean","build:all","test:all"]
# 必要があればプロジェクトとワークスペースのパス
# $PROJECT = "Hoge.xcodeproj"
# $WORKSPACE = "Hoge.workspace"
# デフォルトのビルドスキーム

Grunt Memo


What's Grunt?


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