Skip to content

Instantly share code, notes, and snippets.

View kittinunf's full-sized avatar

Kittinun Vantasin kittinunf

View GitHub Profile
@kittinunf
kittinunf / gist:5772139
Last active November 26, 2016 11:47
fkung's .bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
[ -s "/Users/kittinun-vantasin/.scm_breeze/scm_breeze.sh" ] && source "/Users/kittinun-vantasin/.scm_breeze/scm_breeze.sh"
export ANDROID_HOME=~/Library/Android/sdk
export ANDROID_NDK=$ANDROID_HOME/ndk-bundle
PATH=/usr/local/sbin:/usr/local/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/ndk-bundle:$PATH
alias stree='open -a SourceTree'
@kittinunf
kittinunf / gist:5772164
Created June 13, 2013 08:38
.gitconfig
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
set nocompatible
" misc
set showcmd
set showmatch
" indentation
set autoindent
set smartindent
set expandtab
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(customParseToFloat64("-12.345678"))
}
BasedOnStyle: Chromium
AlignTrailingComments: true
BreakBeforeBraces: Attach
ColumnLimit: 0
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
{
"pagination":{
"total_pages":296,
"current_page":1,
"last_page":false,
"previous_page":null,
"next_page":2
},
"activities":[
{
- (RACSignal *)rac_requestWithMethod:(NSString *)method path:(NSString *)path parameters:(id)parameters {
return [[RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
NSError *error;
NSURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:path relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&error];
if (error) {
[subscriber sendError:error];
return nil;
}
class User(val id: Int, val name: String, val age: Int, val email: String) {
class Deserializer : Deserializable<User> {
override val deserializer: (JSON) -> Result<User, Exception> = { json ->
::User.create.
map(json at "id").
apply(json at "name").
apply(json at "age").
apply(json at "email")
}
//
// UIScrollView+RACSupport.h
// Taskworld
//
// Created by Kittinun Vantasin on 8/5/15.
// Copyright (c) 2015 Taskworld. All rights reserved.
//
@import UIKit;
import UIKit
/*:
## Redux
A Predictable state container for not just JavaScript apps
*/
/*:
### Action
Payload of information from app to your __Store__