Skip to content

Instantly share code, notes, and snippets.

View Qs-F's full-sized avatar

たふみ Qs-F

View GitHub Profile
import SwiftUI
struct ContentView: View {
@StateObject private var object = Object()
var body: some View {
List(object.numbers, id: \.self) { number in
Text("Content \(number)")
}
.refreshable {
@treastrain
treastrain / ConcurrencyNFCApp.swift
Created August 27, 2021 20:45
SwiftUI App + Core NFC + Swift Concurrency を使って書いた、交通系電子マネーカードの残高読み取りサンプル。 https://twitter.com/treastrain/status/1431356306963587072
//
// ConcurrencyNFCApp.swift
// ConcurrencyNFC
//
// Created by treastrain on 2021/08/28.
//
import SwiftUI
import CoreNFC
@nobonobo
nobonobo / README.md
Created June 3, 2021 06:23
32bitsアーキテクチャにて64bitsアラインミスマッチなフィールド定義を静的解析でチェックする方法

以下の様にすることで64bitsアラインをまたいでるフィールドがあれば警告が出るようになります。

go build -o checker ./checker.go
GOOS=linux GOARCH=arm go vet -vettool checker ...
@treastrain
treastrain / Task :shared:linkDebugFrameworkIosX64 FAILED
Last active March 20, 2021 13:35
Task :shared:linkDebugFrameworkIosX64 FAILED
Command line invocation:
/Applications/Xcode-12.5.0-Beta.3.app/Contents/Developer/usr/bin/xcodebuild -project /Users/treastrain/AndroidStudioProjects/MyKMMApplication/./iosApp/iosApp.xcodeproj -scheme iosApp OBJROOT=/Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios SYMROOT=/Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios -sdk iphoneos -arch arm64
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
ARCHS = arm64
OBJROOT = /Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios
SDKROOT = iphoneos14.5
@omo
omo / Dockerfile
Created February 1, 2021 05:26
oauth2-proxy on Cloud Run
FROM alpine:3.13
WORKDIR /opt/draft-proxy
RUN apk update && apk add git curl
RUN curl -L -o package.tgz https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v6.1.1/oauth2-proxy-v6.1.1.linux-amd64.tar.gz && \
tar xvzf package.tgz && \
mv oauth2-proxy-*.linux-amd64/oauth2-proxy .
CMD ["./oauth2-proxy", \
"--provider=github", "--github-org=YOUR_GITHUB_ORG", "--email-domain=*", \
"--http-address=0.0.0.0:8080", \
"--reverse-proxy=true", \
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@zacky1972
zacky1972 / pldi18main-p10-p.md
Created June 2, 2019 11:41
Ryu: Fast Float-to-String Conversion

https://dl.acm.org/citation.cfm?id=3192369

やばい論文を見つけた。たとえるなら,世界中でありふれた野菜炒めで世界一だと認められたようなもの。一刻も早く全文を読みたい。

Abstract

We present Ryu, a new routine to convert binary floating point numbers to their decimal representations using only fixed-size integer operations, and prove its correctness. Ryu is simpler and approximately three times faster than the previously fastest implementation.

解決したい技術的課題

@bcherny
bcherny / typescript-effect-system.ts
Last active July 19, 2021 17:07
designing an effect system in typescript
type Effect<A> = {type: A}
interface IO<A> {}
interface NetworkIO<A> extends IO<A> {}
interface DOMMutation<A> {}
interface DOMAppend<A> extends DOMMutation<A> {}
interface DOMRemove<A> extends DOMMutation<A> {}
function request<A>(url: string): Promise<A> & Effect<NetworkIO<A>> {
@aroder
aroder / install_ffmpeg_with_librtmp.sh
Last active July 29, 2021 15:58
shell script to install FFmpeg with librtmp, which is necessary to use it with DaCast. Much of this comes from http://help.dacast.com/hc/en-us/articles/202357380-Stream-on-DaCast-under-Linux-with-ffmpeg
#!/bin/bash
# this scripts assumes Ubuntu 14.04 LTS
# ensure the following sources are in /etc/apt/sources.list
# deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse