Skip to content

Instantly share code, notes, and snippets.

View ohtwo's full-sized avatar
๐ŸŒ™
ยฐ โ˜พ โ˜† ยธ. ยธใ€€โ˜… :.ใ€€ . โ€ข โ—‹ ยฐ โ˜…

Kang Byeonghak ohtwo

๐ŸŒ™
ยฐ โ˜พ โ˜† ยธ. ยธใ€€โ˜… :.ใ€€ . โ€ข โ—‹ ยฐ โ˜…
View GitHub Profile
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@digitaljhelms
digitaljhelms / gist:4287848
Last active May 13, 2025 00:34
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2025 01:21
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@akisute
akisute / APIClient.swift
Last active October 6, 2015 17:53
Example of APIClient and TestCase in Swift, using AFNetworking/Bolts
import UIKit
// How to make singleton classes in Swift: http://stackoverflow.com/questions/24024549/dispatch-once-singleton-model-in-swift
// Basically using global constants is the most easy and safe way to go
class APIClient: NSObject {
let functionSessionManager:AFHTTPSessionManager
class var sharedInstance:APIClient {
import Foundation
struct Meter {
var value: Double
init(_ value: Double) {
self.value = value
}
var mm: Double { return value * 1000.0 }
@rbrockerhoff
rbrockerhoff / dictext.swift
Last active March 6, 2020 19:19
Some useful extensions to Dictionary
extension Dictionary {
init (_ array: Array<Element>) {
self = [ : ]
self.merge(array)
}
mutating func merge (array: Array<Element>) {
for (key: KeyType, value: ValueType) in array {
self[key] = value
}
@mattt
mattt / regex.swift
Created August 11, 2014 18:08
Creating a regular expression object from a String literal
class Regex {
let pattern: String
let options: NSRegularExpressionOptions!
private var matcher: NSRegularExpression {
return NSRegularExpression(pattern: self.pattern, options: nil, error: nil)
}
required init(pattern: String, options: NSRegularExpressionOptions = nil) {
self.pattern = pattern
func encode<T>(var value: T) -> NSData {
return withUnsafePointer(&value) { p in
NSData(bytes: p, length: sizeofValue(value))
}
}
func decode<T>(data: NSData) -> T {
let pointer = UnsafeMutablePointer<T>.alloc(sizeof(T.Type))
data.getBytes(pointer)
@radex
radex / NSTimer.md
Last active May 30, 2018 10:33
Swift Extensions: NSTimer

NSTimer is a great example of an over-verbose, outdated Objective-C API. To run a simple line of code after a delay, you need to write a lot of boilerplate crap.

How about this:

NSTimer.schedule(5.seconds) {
  println("Hello world!")
}
@sooop
sooop / Monads.swift
Last active February 3, 2020 16:20
Monad in Swift : ๋ชจ๋‚˜๋“œ ๊ฐœ๋…์„ Swift๋กœ ๊ตฌํ˜„ํ•ด๋ณธ๋‹ค.
/*
๋ชจ๋‚˜๋“œ๋Š” ํŠน์ •ํ•œ ํƒ€์ž…์„ ๊ฐ์‹ธ๋Š” ํƒ€์ž…์ด๋ฉฐ,
rawํ•œ ๊ฐ’์„ ๊ฐ์‹ธ๋Š” ํ•จ์ˆ˜์™€
rawํ•œ ๊ฐ’์„ ๋ชจ๋‚˜๋“œ ๊ฐ’์œผ๋กœ ๋ฐ”๊พธ๋Š” ์–ด๋–ค ํ•จ์ˆ˜์— ๋ฐ”์ธ๋”ฉ๋œ๋‹ค.
์ด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๋ชจ๋‚˜๋“œ ํ”„๋กœํ† ์ฝœ์„ ์ •์˜ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.
*/
protocol Monad {