井戸端iOS飯とは、昼休み1時間+MTG分の30分の計1時間30分を利用して、 NBFオフィスのコラボのプロジェクターとスクリーンを利用して、 最新のスマホアプリ開発技術に関する動画を見ながらご飯を食べて、 交流する場です。
ぜひお気軽にご参加ください。
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
require 'yaml' | |
cops = File.read('.rubocop_todo.yml') | |
.split("\n\n") | |
.drop(1) | |
.map { | |
{ | |
count: _1.match(/Offense count: (\d+)/).captures[0].to_i, | |
yaml: YAML.load(_1), | |
auto_correct: _1.match(/Cop supports --auto-correct/) != nil | |
} |
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 Foundation | |
import CoreData | |
protocol NSManagedObjectMappable: NSManagedObject where MapFrom.MapFrom == Self { | |
associatedtype MapFrom: MappableFromNSManagedObject | |
static func mappedObject(from object: MapFrom, in context: NSManagedObjectContext) -> Self | |
} | |
enum MappingError: Error { | |
case missingNonOptionalValue(String) |
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 Darwin | |
let string = "hello world" | |
var array = [UInt8]() | |
string.withCString { ptr in | |
print("strlen: \(strlen(ptr))") | |
let length = strlen(ptr) | |
var currentPtr = ptr |
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 Foundation | |
let array: [String?] = ["a", "b", "c", "e"] | |
print(array) // => [Optional("a"), Optional("b"), Optional("c"), Optional("e")] | |
let strings = array.flatMap { $0! } | |
print(type(of: strings)) // => Array<Character> |
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 | |
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) | |
echo Xcode DVTPlugInCompatibilityUUID is $UUID | |
for MyPlugin in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/* | |
do | |
UUIDs=$(defaults read "$MyPlugin"/Contents/Info DVTPlugInCompatibilityUUIDs) | |
echo $MyPlugin | |
if echo "${UUIDs[@]}" | grep -w "$UUID" &>/dev/null; then | |
echo "The plug-in's UUIDs has contained the Xcode's UUID." | |
else |
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
# 1 | |
class Coriander | |
include MyApp::Entity::HasId | |
end | |
# 2 | |
class Coriander | |
include MyApp::Entity::Identifiable | |
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
class ChainQuery | |
def initialize(init_value) | |
@init_value = init_value | |
@filters = [] | |
end | |
def add_filter(&block) | |
@filters << block | |
self | |
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
class NotifyEndpoint | |
enum platform: [:apns, :gcm] | |
end |
NewerOlder