Skip to content

Instantly share code, notes, and snippets.

View gliyao's full-sized avatar
:octocat:
hungry

Liyao Chen gliyao

:octocat:
hungry
View GitHub Profile
@gliyao
gliyao / bbgo.yaml
Created March 30, 2022 12:56
Liyao's bbgo config
---
notifications:
slack:
defaultChannel: "bbgo-bollmaker"
errorChannel: "bbgo-bollmaker"
# routing rules
routing:
trade: "$silent"
order: "$slient"
@gliyao
gliyao / Brewfile
Last active February 17, 2022 04:33 — forked from hlb/Brewfile
Clean Install Script
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap "homebrew/cask-fonts"
tap 'homebrew/cask-versions'
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/services"
tap "hsatac/toybox"
brew "coreutils"
brew "gnu-sed"
@gliyao
gliyao / new_gist_file_0
Created May 19, 2017 03:45
Delete all simulator
xcrun simctl list > simulators.txt
cat simulators.txt | cut -d "(" -f 2 | cut -d ")" -f 1 | while read sim; do xcrun simctl delete $sim; done
@interface LCTableViewTests : XCTestCase
@end
@implementation LCTableViewTests
//驗證 OCMock Stub method 本身
- (void)testOCMockStubMethod
{
//Arrange
id protocolMock = OCMProtocolMock(@protocol(UITableViewDataSource));
@gliyao
gliyao / testTableViewDataSourceNumberOfRowsInSecitonWithDummyClass.m
Created April 9, 2017 12:45
testTableViewDataSourceNumberOfRowsInSecitonWithDummyClass
@interface LCTableViewTests : XCTestCase
@end
@implementation LCTableViewTests
//驗證互動
- (void)testTableViewDataSourceNumberOfRowsInSecitonWithDummyClass
{
//Arrange
DummyUITableViewDataSource *dataSource = [[DummyUITableViewDataSource alloc] init];
@gliyao
gliyao / dummyUITableViewDataSource.m
Last active April 9, 2017 12:43
dummyUITableViewDataSource
@interface DummyUITableViewDataSource : NSObject <UITableViewDataSource>
@end
@implementation DummyUITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 40;
}
@gliyao
gliyao / swift_log.swift
Last active December 30, 2016 09:06
swift_log
enum LogTag: String {
case APP = "[APP]"
case DEBUG = "[DEBUG]"
case ERROR = "[ERROR]"
}
fileprivate func debugLog( _ log: @autoclosure () -> Any, _ tags: [LogTag]) {
#if DEBUG
var tagStr = ""
for tag in tags {
@gliyao
gliyao / remove_simulators.sh
Created January 22, 2016 02:38
Remove all simulator in xcode
xcrun simctl list | grep -oh '[A-Z0-9]\{8\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{12\}' | xargs -n1 xcrun simctl delete
@gliyao
gliyao / LCTextView.h
Created November 15, 2015 03:28
Multiple lines placeholder text view
@interface LCTextView : UITextView
@property (strong, nonatomic) NSString *placeholder;
@property (strong, nonatomic) UIColor *placeholderColor;
- (void)textChangeNotifiaciton:(NSNotification *)n;
@end
@gliyao
gliyao / rm_git_chache
Created January 29, 2015 02:18
Untrack file without delete.
git rm --cached mylogfile.log