Skip to content

Instantly share code, notes, and snippets.

@kumamotone
kumamotone / uhoho-i.dart
Created February 16, 2022 16:23
クレしんのホラー回って毎回怖い
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@gfx
gfx / 001-wifi-routers-v2.md
Last active June 9, 2024 18:04
Wi-Fiルーターおすすめ by 妻

概要

  • ネットーワーク機器のマーケ担当をしてる妻から聞いた、Wi-Fiルータのオススメ(「同僚のメーカー担当ごとに己の”最強”を選んでもらった」とのこと)です
  • 「ルーターにはWi-Fiルータだけじゃなく他にもいろいろあるんだよ!これはWi-Fiルータのことね」と言われたのでタイトルを変えました
  • 「AXほにゃらら」は規格(AX = Wi-Fi 6)+速度の参考値とのことです
  • もともとの文脈: 家庭内の雑談をツイートしたところ( https://twitter.com/__gfx__/status/1464084908091920387 )知人が反応したので妻に「ルータのおすすめ教えてと知人がいってるのでなんか教えて」といって教えてもらったのが元です
  • 下にあるv1.md が最初のやつ(2021/11/26)で、このv2.md がホッテントリ入りしたあとの改訂版(2021/11/27)です

追記(2022/05/24):

  • TP-Linkはちょいちょいやらかしがあります
@rinsuki
rinsuki / Disable Apple Music.mobileconfig
Created October 19, 2021 00:02
Disable Apple Music in macOS 12 Monterey Music.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>Disable Apple Music in Music.app</string>
<key>PayloadDisplayName</key>
import Foundation
enum HTTPMethod {
case get, post, patch
}
protocol SampleRequest {
var method: HTTPMethod { get }
var path: String { get }
var parameters: Any? { get }
@ryotapoi
ryotapoi / URLQueryItemAccess.swift
Last active March 17, 2020 09:09
URLQueryItemをカッコよく使いたい
import Foundation
// MARK: - URLQueryItem Key
class URLQueryItemKeys {
init() {}
}
class URLQueryItemKey<Value : URLQueryItemValueCompatible> : URLQueryItemKeys {
let name: String
import Foundation
let intJson = #"{ "inUse": 1, "name": "Daiki Matsudate", "twitter": "d_date", "stars": 99999, "occupation": null}"#
let boolJson = #"{ "inUse": true, "name": "Daiki Matsudate", "twitter": "d_date", "stars": 99999, "occupation": null}"#
protocol Inherits {
associatedtype SuperType
var `super`: SuperType { get }
}
@takasek
takasek / CodingKeyToSnake.swift
Last active August 5, 2020 06:08
CodingKeyをJSONのkeyに寄せて書くことができた!
// https://github.com/apple/swift/blob/b0f5815d2b003df628b1bcfe94681fec489c9492/stdlib/public/Darwin/Foundation/JSONEncoder.swift#L153
func _convertToSnakeCase(_ stringKey: String) -> String {
guard !stringKey.isEmpty else { return stringKey }
var words : [Range<String.Index>] = []
// The general idea of this algorithm is to split words on transition from lower to upper case, then on transition of >1 upper case characters to lowercase
//
// myProperty -> my_property
// myURLProperty -> my_url_property
//
import Foundation
struct C : Codable {
var name: String
var age: Int
}
struct D : Codable {
var power: Float
var size: Float