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
class Foo { | |
var name: String? // instance property | |
/** | |
You define type properties with the static keyword. | |
For computed type properties for class types, | |
you can use the class keyword instead to allow subclasses to override the superclassโs implementation. | |
The example below shows the syntax for stored and computed type properties | |
*/ | |
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
### Normal | |
alias cl_ipconfig='ifconfig | grep inet' | |
### iOS | |
alias cl_show_simulators='xcrun simctl list' | |
alias cl_open_xcode_matadata='open -a finder ~/Library/Developer/Xcode' | |
alias cl_open_provisioning_profiles='open -a finder ~/Library/MobileDevice/Provisioning\ Profiles/' |
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
//A ๅฐๅๅธ J ๆฐ็ซน็ธฃ | |
//B ๅฐไธญๅธ K ่ๆ ็ธฃ T ๅฑๆฑ็ธฃ | |
//C ๅบ้ๅธ U ่ฑ่ฎ็ธฃ | |
//D ๅฐๅๅธ M ๅๆ็ธฃ V ๅฐๆฑ็ธฃ | |
//E ้ซ้ๅธ N ๅฝฐๅ็ธฃ W ้้็ธฃ | |
//F ๅฐๅ็ธฃ O ๆฐ็ซนๅธ X ๆพๆน็ธฃ | |
//G ๅฎ่ญ็ธฃ P ้ฒๆ็ธฃ | |
//H ๆกๅ็ธฃ Q ๅ็พฉ็ธฃ Z ้ฃๆฑ็ธฃ | |
//I ๅ็พฉๅธ |
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
// mode: 0 ๆฏ ็ด่งไธ่งๅฝข, 1 ๆฏ ็ญ่ ฐไธ่งๅฝข | |
// size: ้้ท | |
func printer(mode: Int, size: Int) { | |
// Print a right angled triangle | |
func rightAngledTriangle() { | |
var i = 1 | |
while i <= size { | |
var string = "" |
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
# Thanks to here https://stackoverflow.com/questions/13861658/is-it-possible-to-search-though-all-xcodes-logs | |
EXT=".xcactivitylog" | |
for LOG in *.xcactivitylog; do | |
NAME=`basename $LOG $EXT` | |
gunzip -c -S $EXT "${NAME}${EXT}" > "${NAME}.log" | |
done |
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
<?php | |
$premissionA = 1; // 1 | |
$premissionB = 1 << 1; // 2 | |
$premissionC = 1 << 2; // 4 | |
$premissionD = 1 << 3; // 8 | |
$premissionE = 1 << 4; // 16 | |
$premissionF = 1 << 5; // 32 | |
$premissionG = 1 << 6; // 64 | |
$premissionH = 1 << 7; // 128 |
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
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null |
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
// ****************************************** | |
// | |
// MARK: - Config injection | |
// | |
// ****************************************** |
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
/// CLSTableViewConfig for extend, add more tableview properties. | |
struct CLSTableViewConfig { | |
var heightForRow: CGFloat? | |
} |
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
protocol CLSPickerViewProtocol { | |
var title: String { get } | |
var id: Int { get } | |
} | |
final class CLSPickerView<T: LLPickerViewProtocol>: UIPickerView, UIPickerViewDelegate, UIPickerViewDataSource { | |
var selectHandler: ((T) -> Void)? | |
var contents: [T] = [] { |
OlderNewer