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
| cd $path | |
| DATE=`date -v-6d +"%Y-%m-%d"` | |
| AUTHOR=`git config user.name` | |
| LOG=`git log --branches --pretty=format:"\n%ad: %s" --date=short --after=$DATE --author="$AUTHOR"` | |
| CHANGES=`git log --branches --date=short --after=$DATE --author="$AUTHOR" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "本周贡献代码: +%s行, -%s行, 总行数: %s\n", add, subs, loc }' -` | |
| WEEKSTART=`date -v"monday" +"%-m月%d"` | |
| TODAY=`date +"%-m月%d"` | |
| REPORT="【周报】$WEEKSTART ~ $TODAY \n\n$CHANGES\n$LOG\n" |
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
| tell application "System Preferences" | |
| activate | |
| end tell | |
| tell application "System Events" | |
| tell process "System Preferences" | |
| activate | |
| delay 1 | |
| click menu item "Displays" of menu "View" of menu bar 1 | |
| delay 1 |
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 Cocoa | |
| import CreateML | |
| let 双色球神算子 = try MLTextClassifier(trainingData: [ | |
| "中奖啦": [ | |
| "09 11 14 20 27 30 09", | |
| "02 09 14 15 16 23 10", | |
| "11 16 19 22 25 30 08", | |
| "02 05 06 13 16 19 03", | |
| "04 09 15 16 19 27 10", |
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 UIKit | |
| import PlaygroundSupport | |
| let chartData: [Double] = [1, 2, 4, 0, 0, 2, 6, 0, 4, 8, 12, 14, 1, 2, 2, 0, 0, 1, 6, 0, 4, 0, 3, 0] | |
| class TimelineCandleChart: UIView { | |
| var data: [Double] = [] { | |
| didSet { setNeedsDisplay() } | |
| } |
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
| // | |
| // RxTextFieldDelegateProxy.swift | |
| // | |
| // Created by Lex Tang on 2/14/18. | |
| // Copyright © 2018 Krunoslav Zaher. All rights reserved. | |
| // | |
| import RxSwift | |
| import RxCocoa |
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 | |
| PLISTBUDDY="/usr/libexec/PlistBuddy" | |
| INFO_PLIST="$CODESIGNING_FOLDER_PATH/Info.plist" | |
| SETTINGS_PLIST="$CODESIGNING_FOLDER_PATH/Settings.bundle/Root.plist" | |
| VERSION_NUMBER="`$PLISTBUDDY -c \"Print CFBundleShortVersionString\" \"$INFO_PLIST\"`" | |
| BUILD_NUMBER="`$PLISTBUDDY -c \"Print CFBundleVersion\" \"$INFO_PLIST\"`" | |
| VERSION="Version $VERSION_NUMBER ($BUILD_NUMBER)" | |
| GROUP_INDEX="`xmllint --xpath \"count(//array/dict)-1\" \"$SETTINGS_PLIST\"`" | |
| $PLISTBUDDY -c "Set :PreferenceSpecifiers:$GROUP_INDEX:Title '$VERSION'" "$SETTINGS_PLIST" |
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 | |
| enum CollectionOperator: String { | |
| case avg | |
| case count | |
| case max | |
| case min | |
| case sum |
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
| # | |
| # https://roelant.net/2015/share-your-vpn-mac-el-capitan.html | |
| sleep 15 | |
| # | |
| /usr/sbin/sysctl -w net.inet.ip.fw.enable=1 | |
| /usr/sbin/sysctl -w net.inet.ip.forwarding=1 | |
| /usr/sbin/sysctl -w net.inet6.ip6.forwarding=1 | |
| pfctl -d | |
| pfctl -f /Users/lex/Dropbox/openvpn/pf.conf -e |
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
| // | |
| // BackgroundHint.m | |
| // Zus | |
| // | |
| // Created by Lex on 4/13/16. | |
| // Copyright © 2016 lex.sh. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <UIKit/UIKit.h> |
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
| luaSetWaxConfig({openBindOCFunction="true"}) | |
| waxClass{"Zus.SettingVC"} | |
| function viewDidLoad(self) | |
| print("lua viewDidLoad"); | |
| self:ORIGviewDidLoad(); | |
| self:setTitle("Wax-patched " .. wax.appVersion) | |
| end |