Skip to content

Instantly share code, notes, and snippets.

View bonty's full-sized avatar

bonty bonty

  • TimeTree, Inc.
View GitHub Profile
@bonty
bonty / keymap.rb
Created January 4, 2022 08:43
keymap.rb
kbd = Keyboard.new
kbd.init_pins(
[ 20, 19, 18, 17, 16 ],
[ 8, 7, 6, 2, 3, 4, 5, 10, 15, 14, 13, 12, 11, 9, 21 ]
)
kbd.add_layer :default, %i[
KC_ESC KC_1 KC_2 KC_3 KC_4 KC_5 KC_6 KC_7 KC_8 KC_9 KC_0 KC_MINS KC_EQL KC_BSPC XXXXXXX
KC_TAB KC_Q KC_W KC_F KC_P KC_B KC_J KC_L KC_U KC_Y KC_SCOLON KC_LBRC KC_RBRC KC_BSLS KC_PGUP
@bonty
bonty / bootstrap.json
Last active August 29, 2015 14:16
build_server_setting
{
"formulas": [
"android-ndk",
"android-sdk",
"ant",
"brew-cask",
"git",
"gradle",
"Caskroom/cask/java"
"jenkins",
@bonty
bonty / understanding_computation_3.md
Created December 15, 2014 17:41
Understanding Computation読書会 第3回資料

アカツキ社内エンジニア勉強会

Understanding Computation

p.27-33 文(statement)の途中まで


2.3.1.1 復習

ElasticbeanstalkでRailsアプリ on Dockerのデプロイをした話


自己紹介

  • 河野 洋志
  • twitter: @bonty inline
  • アカツキでエンジニアをしています
  • 最近はcocos2d-x、アプリケーションの設計、BigQueryとか興味があります
#!/bin/sh
# Check if the registry image is already installed
IS_INSTALLED=`docker images | grep -E 'registry\s*latest' | wc -l`
if [ $IS_INSTALLED == 0 ]; then
. /opt/elasticbeanstalk/hooks/common.sh
# Load ElasticBeanstalk environment variables
touch /tmp/env.sh
#!/bin/bash
. /opt/elasticbeanstalk/hooks/common.sh
# Load ElasticBeanstalk environment variables
touch /tmp/env.sh
chmod 600 /tmp/env.sh
jq .docker.env[] $EB_CONFIG_FILE | tr -d \" > /tmp/env.sh
@bonty
bonty / hack.sh
Created May 6, 2014 09:24 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@bonty
bonty / LoadLocalHTML.m
Last active December 20, 2015 17:48
ローカルのhtmlファイルをUIWebViewでロードする
// in Resources Directory
NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"];
// in Documents Directory
NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:req];
@bonty
bonty / UIViewController+MyCategory.h
Last active December 20, 2015 16:48
Categoryで擬似インスタンス変数を設定する
#import <UIKit/UIKit.h>
@interface UIViewController (MyCategory)
@property (nonatomic, strong) NSNumber *myProperty;
@end
@bonty
bonty / GetNSDictionaryInNSArray.mm
Created August 6, 2013 11:14
NSArrayの中から指定した要素のNSDictionaryを取得する
// name = 'hoge' の index を取得
NSUInteger idx = [[array valueForKey:@"name"] indexOfObject:@"hoge"];
NSDictionary *dic = [array objectAtIndex:idx];