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
# opening and closing windows and popovers | |
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
# smooth scrolling | |
defaults write -g NSScrollAnimationEnabled -bool false | |
# showing and hiding sheets, resizing preference windows, zooming windows | |
# float 0 doesn't work | |
defaults write -g NSWindowResizeTime -float 0.001 |
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
# System Preferences -> Accessibility -> Display -> Reduce motion | |
tell application "Messages" to activate | |
tell application "Messages" | |
set chatCount to (count of chats) | |
end tell | |
tell application "System Events" | |
tell process "Messages" |
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
#!/bin/bash | |
# | |
# This macOS bash script helps you initialize a new Shadowsocks server with doctl in seconds. | |
# Original author: lexrus https://github.com/lexrus | |
# | |
# You can get $100 free credit for create VPS in DigitalOcean with my referral link: | |
# https://m.do.co/c/3eb5cf371fc9 | |
# | |
# Please intall and authorize doctl before running this script. | |
# https://github.com/digitalocean/doctl |
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
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 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/sh | |
# | |
# This startup script initializes a Shadowsocks server in Debian 11. | |
# It's compatible with DigitalOcean, Linode and Vultr. | |
# | |
# Author: @lexrus https://github.com/lexrus | |
# | |
# Get $100 free credit for VPS with my referral links: | |
# DigitalOcean: https://m.do.co/c/3eb5cf371fc9 | |
# Linode: https://www.linode.com/lp/refer/?r=9f144941e797d495a10c2841c3137ce1acde5f15 |
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
// | |
// RxTextFieldDelegateProxy.swift | |
// | |
// Created by Lex Tang on 2/14/18. | |
// Copyright © 2018 Krunoslav Zaher. All rights reserved. | |
// | |
import RxSwift | |
import RxCocoa |
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
http://devstreaming.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=1 |
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
/*/../usr/bin/true | |
source="$0" | |
compiled="$0"c | |
if [[ "$source" -nt "$compiled" ]]; then | |
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcrun swiftc -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -g "$source" -o "$compiled" || exit | |
fi | |
"$compiled" |
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
func pleaseRetweet() { | |
let isMocking = //* // <- please try remove the first slash | |
true | |
// */ false | |
print(isMocking) | |
//* // <- please try remove the first slash | |
print("不") |
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 | |
class `Self` { | |
/// 我是谁,我从哪里来,我要到哪去 | |
lazy var `self`: Self? = { [weak self] in | |
guard let self = self else { return { [weak self] in { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() }() } | |
guard let self = { [weak self] in self }() else { return { [weak self] in { [weak self] in { [weak self] in { [weak self] in self }() }() }() }() } | |
guard let self = { [weak self] in { [weak self] in self }() }() else { return { [weak self] in { [weak self] in { [weak self] in self }() }() }() } | |
guard let self = { [weak self] in { [weak self] in { [weak self] in self }() }() }() else { return { [weak self] in { [weak self] in self }() }() } |
NewerOlder