Skip to content

Instantly share code, notes, and snippets.

View ktakayama's full-sized avatar
:octocat:

Kyosuke Takayama ktakayama

:octocat:
View GitHub Profile
#import <Foundation/Foundation.h>
@interface UILabel (ktlib)
- (void) fitSizeOfFont:(UIFont *)font;
@end
#import <Foundation/Foundation.h>
@interface UIBarButtonItem (appearance)
+ (void) setupAppearance;
@end
@ktakayama
ktakayama / config.inc.sample
Created April 2, 2015 02:28
King of Time to slack
<?
$SLACK_NAMES = array(
'田中 太郎' => '@tanaka',
'高山 二郎' => '@takayama',
'木村 三郎' => '@kimura'
);
define('ACCESS_TOKEN', 'YOUR ACCESS TOKEN');
define('API_POST_MESSAGE_URL', 'https://slack.com/api/chat.postMessage');
protocol SpeakProtocol {
func speak() -> String
// func action() -> String
}
extension SpeakProtocol {
func speak() -> String {
print("SpeakProtocol's speak")
return "I am anything"
}
protocol SpeakProtocol {
// func speak() -> String
func instinctSpeak() -> String
}
extension SpeakProtocol {
func speak() -> String {
return "I am anything"
}
@ktakayama
ktakayama / japanese_command.json
Created July 3, 2017 01:10
英数・カナキーをコマンドキーにする
{
"title": "英数・カナキーをコマンドキーにする",
"rules": [
{
"description": "英数・かなキーを単体で押したときに、コマンドキーキーを送信する。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "japanese_eisuu",
@ktakayama
ktakayama / eisuu_to_command.json
Created July 3, 2017 02:00
英数キーをコマンドキーにする
{
"title": "英数キーをコマンドキーにする",
"rules": [
{
"description": "英数キーを単体で押したときに、コマンドキーキーを送信する。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "japanese_eisuu",
@ktakayama
ktakayama / c-j_to_eisuu+c-j.json
Last active July 11, 2017 08:31
Ctrl-J to eisuu + Ctrl-J
{
"title": "Ctrl-J to eisuu + Ctrl-J",
"rules": [
{
"description": "Ctrl-J to eisuu + Ctrl-J",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "j",
- (void) method {
UIApplication *application = [UIApplication sharedApplication];
[application cancelAllLocalNotifications];
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
NSDate *today = [NSDate date];
NSUInteger i = 0;
NSUInteger mx = 2;
@ktakayama
ktakayama / keybase.md
Created October 15, 2020 00:27
keybase.md

Keybase proof

I hereby claim:

  • I am ktakayama on github.
  • I am ktakayama (https://keybase.io/ktakayama) on keybase.
  • I have a public key whose fingerprint is 260A 7F4E B592 896E 08D5 B798 AE75 7815 F4B2 F985

To claim this, I am signing this object: