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
name: Assign self to Pull Request | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
assign_self_to_pull_request: | |
name: Assign self to Pull Request | |
# dependabot を使っている場合は dependabot の作る PR では動かさない |
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_profiler SPUSBDataType -json | jq -r '.SPUSBDataType | .[]._items | select(. != null) | select(.[]._name == "iPhone" or .[]._name == "iPad") | .[].serial_num' |
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 | |
@propertyWrapper | |
class OnceExecutable { | |
@OnceUpdatable | |
private var execute: () -> Void | |
private var isExecuted = false | |
var wrappedValue: () -> Void { | |
get { execute } |
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 | |
cd ~/Library/Developer/CoreSimulator/Devices/ | |
cd $(find . -type d -name Documents -path "*/data/Containers/Data/Application/*" | xargs ls -dt | head -1) | |
open . |
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
{ | |
"locationActivityMetrics" : { | |
"cumulativeBestAccuracyForNavigationTime" : "0秒", | |
"cumulativeBestAccuracyTime" : "0秒", | |
"cumulativeHundredMetersAccuracyTime" : "0秒", | |
"cumulativeNearestTenMetersAccuracyTime" : "0秒", | |
"cumulativeKilometerAccuracyTime" : "0秒", | |
"cumulativeThreeKilometersAccuracyTime" : "0秒" | |
}, | |
"cellularConditionMetrics" : { |
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
{ | |
"crashDiagnostics" : [ | |
{ | |
"version" : "1.0.0", | |
"callStackTree" : { | |
"callStacks" : [ | |
{ | |
"threadAttributed" : true, | |
"callStackRootFrames" : [ | |
{ |
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
extension UIImage { | |
func rotatedBy(degree: CGFloat) -> UIImage { | |
let radian = -degree * CGFloat.pi / 180 | |
UIGraphicsBeginImageContext(self.size) | |
let context = UIGraphicsGetCurrentContext()! | |
context.translateBy(x: self.size.width / 2, y: self.size.height / 2) | |
context.scaleBy(x: 1.0, y: -1.0) |
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
// web-templateに手を入れてマークダウンを挿入してみます | |
// https://github.com/vapor/web-template/blob/master/Sources/App/Controllers/HelloController.swift | |
import Vapor | |
import HTTP | |
/// Here we have a controller that helps facilitate | |
/// creating typical REST patterns | |
final class HelloController: ResourceRepresentable { | |
let view: ViewRenderer | |
init(_ view: ViewRenderer) { |
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 SwiftMarkdown | |
let markdown = "# Hello" | |
if let html = try? markdownToHTML(markdown) { | |
print(html) // -> "<h1>Hello</h1>\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
import App | |
import LeafProvider | |
import MarkdownProvider | |
// some code... | |
if let leaf = drop.view as? LeafRenderer { | |
leaf.stem.register(Markdown()) | |
} |
NewerOlder