| 更新: | 2013-09-28 |
|---|---|
| バージョン: | 0.0.9 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
Django + Elasticsearch コトハジメの補足記事です
| CUSTOM_SWIFT_SOURCE = $(SRCROOT)/path/to/swift-source | |
| HEADER_SEARCH_PATHS = $(CUSTOM_SWIFT_SOURCE)/swift/include/swift-c/SyntaxParser | |
| LIBRARY_SEARCH_PATHS = $(CUSTOM_SWIFT_SOURCE)/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/lib | |
| LD_RUNPATH_SEARCH_PATHS = $(LIBRARY_SEARCH_PATHS) |
| /*: | |
| ## Reference | |
| * [Swift: Money with Phantom Types](https://www.natashatherobot.com/swift-money-phantom-types/) | |
| * [Swift で Phantom Type (幽霊型)](http://qiita.com/taketo1024/items/71e3272211f08d7e0cde) | |
| * [Functional Snippet #13: Phantom Types](https://www.objc.io/blog/2014/12/29/functional-snippet-13-phantom-types/) | |
| * [Phantom Typeでコンパイル時に状態チェックする: shibuya.swift #4](https://speakerdeck.com/kazuhiro4949/phantom-typedekonpairushi-nizhuang-tai-tietukusuru-shibuya-dot-swift-number-4) | |
| */ | |
| import Foundation |
| #!/usr/bin/env python | |
| import lldb | |
| def slack(debugger, command, result, internal_dict): | |
| frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame() | |
| path = command | |
| lldb.debugger.HandleCommand(""" | |
| expr -l swift -- |
| func createGIF(with images: [UIImage], loopCount: Int = 0, frameDelay: Double, callback: (data: NSData?, error: NSError?) -> ()) { | |
| let fileProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: loopCount]] | |
| let frameProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFDelayTime as String: frameDelay]] | |
| let documentsDirectory = NSTemporaryDirectory() | |
| let url = NSURL(fileURLWithPath: documentsDirectory)?.URLByAppendingPathComponent("animated.gif") | |
| if let url = url { | |
| let destination = CGImageDestinationCreateWithURL(url, kUTTypeGIF, UInt(images.count), nil) | |
| CGImageDestinationSetProperties(destination, fileProperties) |
| #pragma once | |
| #include<type_traits> | |
| namespace ignis { | |
| namespace detail { | |
| // ref) http://stackoverflow.com/questions/2910979/how-is-base-of-works | |
| template<typename Base, typename Derived> |
| # set up flags for Numpy C extentions compiling | |
| export CFLAGS="-arch i386 -arch x86_64" | |
| export FFLAGS="-m32 -m64" | |
| export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" | |
| export CC=gcc-4.2 | |
| export CXX="g++ -arch i386 -arch x86_64" | |
| pip install numpy | |
| # success! |
| 更新: | 2013-09-28 |
|---|---|
| バージョン: | 0.0.9 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
Django + Elasticsearch コトハジメの補足記事です
| 太郎屋 | |
| 京のおばんざい | |
| http://tabelog.com/kyoto/A2602/A260201/26000639/ | |
| 醪音 | |
| 「英勲」の酒蔵の直営店 | |
| http://tabelog.com/kyoto/A2602/A260201/26017974/ | |
| ななたに | |
| 地鶏ローストチキン |
Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql
$ brew install python --universal
Ruby の HTTP クライアントライブラリ Faraday が便利そう
API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた
[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた