Skip to content

Instantly share code, notes, and snippets.

View inamiy's full-sized avatar

Yasuhiro Inami inamiy

View GitHub Profile
@inamiy
inamiy / ARCHelper.h
Created June 13, 2012 15:09 — forked from nicklockwood/ARCHelper.h
ARC Helper
//
// ARC Helper
//
// Version 1.3.1
//
// Created by Nick Lockwood on 05/01/2012.
// Copyright 2012 Charcoal Design
//
// Distributed under the permissive zlib license
// Get the latest version from here:
@inamiy
inamiy / LWHangDetector.h
Created November 9, 2012 06:40 — forked from evanlong/LWHangDetector.h
Simple Hang Detection
/**
Copyright (C) 2011 Evan Long
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:
@inamiy
inamiy / LoremIpsum.h
Last active December 16, 2015 11:48 — forked from jkubicek/gist:1503941
#import <Foundation/Foundation.h>
static inline NSString* LoremIpsum(NSUInteger count)
{
NSString* str = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ";
while ([str length] < count) {
str = [str stringByAppendingString:str];
}
@inamiy
inamiy / mogenerator.sh
Last active December 27, 2015 12:59
Generate CoreData files using mogenerator for each xcdatamodeld.
#!/bin/sh
modelds=`find . -name '*.xcdatamodeld'`
for modeld in $modelds; do
# if xccurrentversion exists
if [ -a "${modeld}/.xccurrentversion" ]; then
currentModel=`/usr/libexec/PlistBuddy "${modeld}/.xccurrentversion" -c 'print _XCCurrentVersionName'`
else
currentModel=`ls ${modeld} | grep .xcdatamodel | head -1`
@inamiy
inamiy / square-enix-project-management.md
Created November 11, 2013 03:15
スクエニのプロジェクト・マネジメント メモ http://www.jp.square-enix.com/info/library/2011/dldata/PM/PM.pdf
[user]
name = Yasuhiro Inami
email = inamiy@gmail.com
[color]
ui = auto
[core]
autocrlf = false
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
editor = /usr/bin/vim
@inamiy
inamiy / CFRunLoop.log
Created July 10, 2014 04:17
[log] CFRunLoop after initial viewDidLoad (iOS8 beta3)
<CFRunLoop 0x7d23a2d0 [0xb9e380]>{wakeup port = 0x1103, stopped = false, ignoreWakeUps = true,
current mode = UIInitializationRunLoopMode,
common modes = <CFBasicHash 0x7d23a5e0 [0xb9e380]>{type = mutable set, count = 2,
entries =>
0 : <CFString 0x18a2148 [0xb9e380]>{contents = "UITrackingRunLoopMode"}
1 : <CFString 0xb8bd38 [0xb9e380]>{contents = "kCFRunLoopDefaultMode"}
}
,
common mode items = <CFBasicHash 0x7d53a450 [0xb9e380]>{type = mutable set, count = 16,
entries =>
@inamiy
inamiy / chat.css
Created September 9, 2014 02:40
HipChat v3.0 for Mac + Remove 'Show more'
/* Prevent font scaling when switching orientations */
html {
-webkit-text-size-adjust: none;
}
* {
margin: 0;
padding: 0;
word-wrap: break-word;
}
@inamiy
inamiy / file0.txt
Created September 27, 2014 04:22
Swiftのnilがなるほどわからん ref: http://qiita.com/inamiy/items/b186e9612352b31261df
let str: NSString? = nil
str?.length == 0 // false
str?.length > 0 // false
str?.length < 0 // true
nil == 0 // false
nil > 0 // false
nil < 0 // true
@inamiy
inamiy / failure.log
Created December 29, 2014 01:53
`pod trunk push --verbose` with/without `spec.requires_arc = true` (NOTE: both cases passes `pod lib lint` validation)
# Memo: no `spec.requires_arc = true` in podspec (push failed)
inamiy@inamiy-MBPR:~/github/Swizzle (master *)$ pod trunk push --verbose
[!] Found podspec `Swizzle.podspec`
Validating podspec
Swizzle (0.0.2) - Analyzing on OS X platform.
Preparing
Analyzing dependencies