Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Dbank daisukenagata

:octocat:
Focusing
View GitHub Profile
@pteasima
pteasima / OnScroll.swift
Last active Dec 16, 2020
SwiftUI onScroll
View OnScroll.swift
import SwiftUI
import Combine
struct OnScroll: ViewModifier {
@Binding var offset: CGFloat
//we can have a version with a closure instead of the binding, but that triggers an infinite loop if content depends on the same Store
// var onOffset: (CGFloat) -> ()
func body(content: Content) -> some View {
return VStack {
@mipsparc
mipsparc / pidcount.py
Last active Oct 30, 2021
MPEG2-TSファイルを解析して、含まれているPIDと数を列挙する
View pidcount.py
#! /usr/bin/env python3
#coding:utf-8
#require bitstring
import bitstring
import math
import sys
filename = sys.argv[1]
packet_length = 188