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 | |
TARGET_DIR=$1 | |
echo "やるお" | |
for file in $(find "$TARGET_DIR" -name "*.swift"); do | |
# struct User: * { の場合。ただし、View適応は除く | |
sed -i '' -E '/struct [A-Za-z0-9_]+: [^{]*View[^{]*\{/!s/(struct [A-Za-z0-9_]+: [^{]*)\{/\1, Sendable {/g' "$file" | |
sed -i '' -E '/enum [A-Za-z0-9_]+: [^{]*View[^{]*\{/!s/(enum [A-Za-z0-9_]+: [^{]*)\{/\1, Sendable {/g' "$file" |
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
const token = 'xoxb-xxx' | |
function main() { | |
var message = 'Hi :)' | |
// send direct message | |
var userID = 'UX...' | |
sendMessage(userID, message) | |
// send group direct message |
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
name: XXXX | |
attributes: | |
LastUpgradeCheck: 1140 | |
ORGANIZATIONNAME: "kankak, Inc." | |
options: | |
bundleIdPrefix: com.xxxx.xxxxxxxx | |
deploymentTarget: | |
iOS: 13.1.3 | |
configs: | |
Develop Debug: debug |
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
extension Optional { | |
public mutating func ensure(_ f: () throws -> Wrapped) rethrows -> Wrapped { | |
if let x = self { | |
return x | |
} | |
let x = try f() | |
self = x | |
return x | |
} |
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 | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//文字列をNSDataに変換し、QRコードを作成します。 | |
//Converts a string to NSData. | |
let str = "カビゴン可愛い、大好き" |