This file contains hidden or 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 UIColor { | |
public convenience init(hex: UInt32, alpha: CGFloat = 1) { | |
let divisor = CGFloat(255) | |
let red = CGFloat((hex & 0xFF0000) >> 16) / divisor | |
let green = CGFloat((hex & 0x00FF00) >> 8) / divisor | |
let blue = CGFloat( hex & 0x0000FF ) / divisor | |
self.init(red: red, green: green, blue: blue, alpha: alpha) | |
} |
This file contains hidden or 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 | |
########################################################################### | |
# Choose your ffmpeg version and your currently-installed iOS SDK version: | |
# | |
VERSION="2.0.2" | |
SDKVERSION="7.0" | |
ARCHS="armv7 armv7s i386" | |
# | |
# |
This file contains hidden or 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/Foundation.h> | |
#import <Photos/PHAsset.h> | |
@interface PHAsset (Addition) | |
@property (nonatomic,assign) BOOL selected; | |
@end |
This file contains hidden or 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
#! /usr/bin/env bash | |
# Get xv6 working with OSX Yosemite | |
# Most things were here: https://doesnotscale.com/compiling-xv6-on-os-x-10-9/ | |
# You need homebrew installed to make this thing work | |
brew tap homebrew/versions && brew install gcc48 | |
brew deps qemu | xargs brew install | |
export PATH=/usr/local/bin:$PATH | |
export CC=/usr/local/bin/gcc-4.8 | |
brew install wget |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Untitled</title> | |
</head> | |
<body> | |
</body> |