Skip to content

Instantly share code, notes, and snippets.

View kostiakoval's full-sized avatar

Kostiantyn Koval kostiakoval

View GitHub Profile
@kostiakoval
kostiakoval / uncrustify-objc.cfg
Created September 7, 2016 11:35 — forked from defagos/uncrustify-objc.cfg
My Objective-C Uncrustify configuration file
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
extension Dictionary {
init(_ elements: [Element]){
self.init()
for (k, v) in elements {
self[k] = v
}
}
func map<U>(transform: Value -> U) -> [Key : U] {
return Dictionary<Key, U>(Swift.map(self, { (key, value) in (key, transform(value)) }))
#!/bin/sh
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2
#ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3
ID='9F75337B-21B4-4ADC-B558-F9CADF7073A7' # Xcode 6.3 GM
PLIST_BUDDY=/usr/libexec/PlistBuddy
function add_compatibility() {
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \
@kostiakoval
kostiakoval / :(
Last active August 29, 2015 14:08 — forked from rnystrom/:(
import Foundation
import ImageIO
infix operator >>= { associativity left }
func >>=<A,B>(l: A?, r: A -> B?) -> B? {
if let x = l {
return r(x)
}
return nil
class Person {
let firstname: String
let lastname: String
init(firstname: String, lastname: String) {
self.firstname = firstname
self.lastname = lastname
}
}
@kostiakoval
kostiakoval / 0_reuse_code.js
Created February 24, 2014 08:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console