Warning
The following guide need to disable SIP to work.
Please confirm the risk of disabling the SIP by yourself.
Another solution which does not require disabling SIP is currently under investigation.
Reboot into Recovery OS + Disable SIP
from json import JSONDecodeError | |
import requests | |
from datetime import datetime | |
import time | |
def queryQuote(a, b): | |
cookie = "xx" | |
headers = { |
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
{ | |
"title": "Switch input source | 输入法切换", | |
"rules": [ | |
{ | |
"description": "Tap Command_L (⌘) → Switch input source to English | 短按左 Command (⌘) → 切换到英文输入法", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ |
#!/usr/bin/env bash | |
# Allow multiple hooks. | |
# | |
# To use it copy this script with executable permission in ".git/hooks/hook-name" | |
# where hook-name is the name of the hook (see man githooks to know available hooks). | |
# Then place your scripts with executable permission in ".git/hooks/hook-name.d/". | |
hook_type=${BASH_SOURCE##*/} |
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
// on a portrait only app, when a video player is launched from a WebView | |
// and the user turn the phone into landscape and then closes the player, | |
// the navigation bar slips under the status bar | |
@property (nonatomic, strong) id observer; | |
- (instancetype)init { | |
@weakify(self); | |
tell application "Google Chrome" | |
set tab_list to every tab in the front window | |
repeat with the_tab in tab_list | |
set the_url to the URL of the_tab | |
tell application "Safari" to open location the_url | |
end repeat | |
end tell |
When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.
So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.
Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?
I'm going to cover three things in this post:
self.tableView.alpha = 0.0f; | |
[self.tableView reloadData]; | |
// Store a delta timing variable so I can tweak the timing delay | |
// between each row’s animation and some additional | |
CGFloat diff = .05; | |
CGFloat tableHeight = self.tableView.bounds.size.height; | |
NSArray *cells = [self.tableView visibleCells]; | |
// Iterate across the rows and translate them down off the screen |