This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: FP Playground | |
import UIKit | |
// Expressive Functions | |
func greeting(_ name: String) -> String { | |
return "Greeting \(name)!" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install libimobiledevice on Mac OS X | |
So you'd like to manage your iOS devices by command line? | |
You can use libimobiledevice tools for that. | |
Easy on Linux. Let's see how it is on Mac OS X. | |
You'll need to: | |
1. install Xcode | |
2. start Xcode and agree to it's license | |
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab) | |
4. install homebrew by this command (sudo password will be prompted) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Character { | |
func utf8() -> UInt8 { | |
let utf8 = String(self).utf8 | |
return utf8[utf8.startIndex] | |
} | |
} | |
func encrypt(c:Character, key:Character) -> String { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NODE_VERSION=0.4.7 | |
NPM_VERSION=1.0.94 | |
# Save script's current directory | |
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
#cd "${DIR}" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |