This file contains 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
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 |
This file contains 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
{ | |
"formulas": [ | |
"android-ndk", | |
"android-sdk", | |
"ant", | |
"brew-cask", | |
"git", | |
"gradle", | |
"Caskroom/cask/java" | |
"jenkins", |
This file contains 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 | |
# 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 |
This file contains 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/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 |
This file contains 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 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 | |
# |
This file contains 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
// 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]; |
This file contains 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 <UIKit/UIKit.h> | |
@interface UIViewController (MyCategory) | |
@property (nonatomic, strong) NSNumber *myProperty; | |
@end |
This file contains 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
// name = 'hoge' の index を取得 | |
NSUInteger idx = [[array valueForKey:@"name"] indexOfObject:@"hoge"]; | |
NSDictionary *dic = [array objectAtIndex:idx]; |
NewerOlder