Skip to content

Instantly share code, notes, and snippets.

View maiyama18's full-sized avatar

maiyama maiyama18

View GitHub Profile
- title: GCP交差点の近くはガラスの破片が散乱していて危険
description:
- title: ローソンOPQ店5/24から営業開始してます
description:
- title: ABC避難所でゴミ捨て・食事運びのボランティア募集
description:
- title: NSD交差点、5/22の余震で瓦礫が崩れて通行止めになっています
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<style>
.store-name {
font-size: 3.5rem;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css"
integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<style>
</style>
import SwiftUI
struct ColoredButton {
let title: String
let color: Color
let offset: CGPoint
}
private let buttons = [
ColoredButton(title: "r\ned", color: .red, offset: CGPoint(x: -100, y: -200)),
import WidgetKit
import SwiftUI
struct RandomNumberWidgetProvider: TimelineProvider {
func placeholder(in context: Context) -> RandomNumberWidgetEntry {
RandomNumberWidgetEntry(date: Date(), number: 42)
}
func getSnapshot(in context: Context, completion: @escaping (RandomNumberWidgetEntry) -> ()) {
let entry = RandomNumberWidgetEntry(date: Date(), number: getRandomNumber())
import WidgetKit
import SwiftUI
struct RandomNumberWidgetProvider: IntentTimelineProvider {
func placeholder(in context: Context) -> RandomNumberWidgetEntry {
RandomNumberWidgetEntry(date: Date(), number: 42)
}
func getSnapshot(for configuration: RandomNumberIntent, in context: Context, completion: @escaping (RandomNumberWidgetEntry) -> ()) {
let entry = RandomNumberWidgetEntry(date: Date(), number: getRandomNumber(configuration: configuration))
import SwiftUI
struct ContentView: View {
@State private var isImageViewerPresented: Bool = false
var body: some View {
VStack {
Button(action: {
withAnimation {
isImageViewerPresented = true
import SwiftUI
extension CGPoint {
func distance(to other: CGPoint) -> CGFloat {
let dx = self.x - other.x
let dy = self.y - other.y
return sqrt(dx * dx + dy * dy)
}
}
import SwiftUI
class Particle {
var position: CGPoint
var velocity: CGPoint
var color: Color
var size: CGFloat
init(position: CGPoint, velocity: CGPoint, color: Color, size: CGFloat) {
self.position = position
import UIKit
import Combine
enum MessageViewControllerFactory {
static func createDefaultImplementation() -> MessageViewController<MessageRepository<APIClient>> {
return MessageViewController(viewState: MessageViewState())
}
}
final class MessageViewController<Repository: MessageRepositoryProtocol>: UIViewController {