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 imaplib | |
conn = imaplib.IMAP4("imap.qq.com") | |
conn.login("182430273","password") | |
conn.select("INBOX") | |
type, data = conn.search(None, 'FROM', '"LDJ"') |
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
CREATE USER 'wishes'@'localhost' IDENTIFIED BY 'wishes'; | |
GRANT ALL PRIVILEGES ON *.* TO 'wishes'@'localhost'; |
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
( | |
export PKG=eslint-config-airbnb; | |
npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG" | |
) |
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 UIKit | |
class EncryptionTransformer: ValueTransformer { | |
override class func allowsReverseTransformation() -> Bool{ | |
return true | |
} | |
override func transformedValue(_ value: Any?) -> Any?{ | |
guard let date = value as? Date else {return nil} | |
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
@discardableResult | |
func dependencyFunction() -> Bool { | |
print("printing using a system console") | |
return true | |
} | |
class SeamTestViewController: UIViewController { | |
func createTrouble() { | |
dependencyFunction() |
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
// production old | |
class SeamTestViewController: UIViewController { | |
func createTrouble() { | |
dependencyFunction() | |
} | |
} | |
extension SeamTestViewController { | |
@discardableResult | |
func dependencyFunction() -> Bool { | |
print("printing using a system console, and good") |
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
//different module | |
extension SeamTestViewController { | |
@discardableResult | |
func dependencyFunction() -> Bool { | |
print("printing using a system console, and good") | |
return true | |
} | |
} |
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
class DataManager { | |
lazy var importer = { | |
return DataImporter() | |
}() | |
var data = [String]() | |
// the DataManager class would provide data management functionality here | |
} |
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
class DataManager { | |
var importer: DataImporter { | |
return DataImporter() | |
}() | |
var data = [String]() | |
// the DataManager class would provide data management functionality here | |
} |
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/libexec/PlistBuddy -c "Delete :NSAppTransportSecurity dict" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" | |
# allow insecure connections for MOCK environment | |
if [ "$env" != "MOCK" ] | |
then | |
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity dict" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" | |
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool NO" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" | |
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSAllowsArbitraryLoadsInWebContent bool YES" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" | |
else | |
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity dict" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" | |
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool NO" "${PROJECT_DIR}/${PROJECT_NAME}/Info.plist" |
OlderNewer