Skip to content

Instantly share code, notes, and snippets.

View urouro-net's full-sized avatar

Kenta Nakai urouro-net

View GitHub Profile
@urouro-net
urouro-net / .md
Last active February 6, 2017 14:04
Hello ``` World ```

[Google][google]

[This is also Google][google]

@urouro-net
urouro-net / .swift
Last active November 3, 2018 08:04
PHAsset Exif
let editOptions = PHContentEditingInputRequestOptions()
editOptions.isNetworkAccessAllowed = true
asset.requestContentEditingInput(with: editOptions) { (contentEditingInput: PHContentEditingInput?, info: [AnyHashable : Any]) in
if let fileURL = contentEditingInput?.fullSizeImageURL {
let image = CIImage(contentsOf: fileURL)
log.debug("properties=\(image?.properties)")
if let gps = image?.properties["{GPS}"] as? [AnyHashable : Any] {
@urouro-net
urouro-net / Vimium-and-BTT_BTT
Last active February 10, 2017 02:41
Vimium + BTT
⌥V -> ⇧^V
⇧⌥, -> ⇧^,
⇧⌥. -> ⇧^.
@urouro-net
urouro-net / gist:ba338649dcb59d1f32af4555e58c10f3
Created January 15, 2017 10:12
Swift 3, Caluculate view size
let string: NSString = place as NSString
let attributes: [String: AnyObject] = [NSFontAttributeName: UIFont(name: "HiraKakuProN-W6", size: 10.0)!]
let labelHeight: CGFloat = 14.0
let size: CGSize = string.boundingRect(
with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: labelHeight),
options: .usesLineFragmentOrigin,
attributes: attributes,
context: nil).size
@urouro-net
urouro-net / .swift
Created January 10, 2017 13:47
Swift Load nib
let view = Bundle.main.loadNibNamed("PreviewHeaderView", owner: self, options: nil)![0]
[
{
"keys": ["ctrl+i"],
"command": "reindent",
"args": {
"single_line": true
}
},
{
@urouro-net
urouro-net / .m
Created August 5, 2016 02:39
Objective-CからSwiftのCocoaPodsを読む
#import "ModuleName-Swift.h"