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
export PATH | |
cdls() { | |
if [ -z "$1" ]; then | |
cd && ls -G | |
else | |
cd "$*" && ls -G | |
fi | |
} | |
alias cd=cdls | |
alias pearp='/Applications/MAMP/bin/php/php5.4.4/bin/pear' |
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
colors = [] | |
for i in range(0, COUNT): | |
colors.append(colorsys.hsv_to_rgb(fmod(i * 0.618033988749895, 1.0), 0.5, 1.0)) |
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
final class SampleViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let button = UIButton(type: .System) | |
// ... | |
button.addTarget(self, action: #selector(SampleViewController.buttonTapped(_:)), forControlEvents: .TouchUpInside) |
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
final class SampleViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let button = UIButton(type: .System) | |
// ... | |
button.addTarget(self, action: #selector(SampleViewController.buttonTapped(_:)), forControlEvents: .TouchUpInside) |
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
public class Runner { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
//Generate the first 100 bits from Blum-Micali PRG with p = 34319, g = 4, and seed x = 1022 | |
long p = 34319; | |
long g = 4; |
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
extension CharacterSet: StringLiteralConvertible, ExtendedGraphemeClusterLiteralConvertible { | |
public init(stringLiteral value: String) { | |
self.init(charactersIn: value) | |
} | |
public init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterType) { | |
self.init(charactersIn: value) | |
} | |
public init(unicodeScalarLiteral value: UnicodeScalarType) { |
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 | |
public protocol FoundationErrorWrapper: ErrorProtocol { | |
static func wrappingError(_ error: NSError) -> Self | |
} | |
enum SomeError: ErrorProtocol, FoundationErrorWrapper { | |
case a | |
case wrappingError(NSError) | |
} |
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
class Operation: NSOperation { | |
override var asynchronous: Bool { | |
return true | |
} | |
private var _executing = false { | |
willSet { | |
willChangeValueForKey("isExecuting") | |
} |
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
class CustomCell: UITableViewCell, Reusable { | |
class var reuseIdentifier: String { | |
return "customCell" | |
} | |
} | |
class SupaHotCustomCell: CustomCell { | |
override class var reuseIdentifier: String { | |
return "supaHotCustomCell" | |
} |
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
"Sometimes when I find myself comparing myself to others and losing | |
steam mentally/emotionally, I have to remind myself where I started, the | |
attitude I had when I began, and how I have already achieved things I never | |
thought possible and that there is no reason for that to change so long as I | |
stay committed, balanced, consistent and hungry." |