Skip to content

Instantly share code, notes, and snippets.

View tsukumijima's full-sized avatar
📺
DTV

tsukumi tsukumijima

📺
DTV
View GitHub Profile
@maki-rxrz
maki-rxrz / FFmpeg patches
Last active August 3, 2023 11:54
FFmpeg patches
各パッチの簡単な説明を記載しておきます。
----------------------------------------------------------------------------------------------------
■ ffmpeg-4.2.2-libavcodec-av-picture-structure.diff
----------------------------------------------------------------------------------------------------
[パッチ対象]
-> libavcodec/mpegvideo_parser.c
@FinlayDaG33k
FinlayDaG33k / gist:23a6134b1ad3e5f867a64219a374406e
Last active February 12, 2024 19:30
Minergate-cli ubuntu installation
Run this command to install MG-CLI:
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <[email protected]> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
@y-takagi
y-takagi / DOCUMENT.md
Last active August 20, 2025 13:21
iOSでデータを永続化する方法

How to save data in iOS

この投稿では、iOSのファイルシステムについて理解し、データを永続化(iCloud含む)する方法を紹介する。尚、サンプルコードは動かない可能性もあるので参考程度にして下さい。

iOS File System

アプリがファイルシステムとやり取り出来る場所は、ほぼアプリのサンドボックス内のディレクトリに制限されている。新しいアプリがインストールされる際、インストーラーはサンドボックス内に複数のコンテナを作成し、図1に示す構成をとる。各コンテナには役割があり、Bundle Containerはアプリのバンドルを保持し、Data Containerはアプリとユーザ両方のデータを保持する。Data Containerは用途毎に、さらに複数のディレクトリに分けられる。アプリは、例えばiCloud Containerのように、実行時に追加のコンテナへのアクセスをリクエストすることもある。

IMG_0017_RESIZE.png

図1. An iOS app operating within its own sandbox

@mipsparc
mipsparc / pidcount.py
Last active June 7, 2025 07:23
MPEG2-TSファイルを解析して、含まれているPIDと数を列挙する
#! /usr/bin/env python3
#coding:utf-8
#require bitstring
import bitstring
import math
import sys
filename = sys.argv[1]
packet_length = 188
Let [tag] = any tag in upstream repo
git fetch upstream --tags
git push origin --tags
@0xbadfca11
0xbadfca11 / Wrong usage Optimize-VHD.md
Created January 5, 2016 09:38
お前らの Optimize-VHD の使い方は間違っている
  • ゲストでsdelete -z→シャットダウンして→Optimize-VHD -Mode Prezeroed
  • ホストでMount-VHDsdelete -zDismount-VHDOptimize-VHD -Mode Prezeroed

これらは時間と書き込み量を浪費しているだけだから今すぐ止めて
Mount-VHD <VHD> [-NoDriveLetter] -ReadOnly -Passthru | Optimize-VHD [-Mode {Quick|Full}] -Passthru | Dismount-VHD
を使うべき。

なんで?

読み取り専用でマウントしている時に Optimize-VHD をすればディスクイメージ内の NTFS から得られる空き領域情報を利用するから。

diff --git a/libavfilter/aarch64/Makefile b/libavfilter/aarch64/Makefile
new file mode 100644
index 0000000..5d6f6d3
--- /dev/null
+++ b/libavfilter/aarch64/Makefile
@@ -0,0 +1,3 @@
+OBJS-$(CONFIG_YADIF_FILTER) += aarch64/vf_yadif_init.o
+
+NEON-OBJS-$(CONFIG_YADIF_FILTER) += aarch64/vf_yadif.o
diff --git a/libavfilter/aarch64/vf_yadif_init.c b/libavfilter/aarch64/vf_yadif_init.c
@Changaco
Changaco / btrfs-undelete
Last active November 6, 2025 21:05
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <[email protected]>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@voluntas
voluntas / webrtc.rst
Last active January 13, 2025 22:40
WebRTC の未来
@fatum12
fatum12 / ttc2ttf.pe
Last active November 2, 2025 01:56
Unpack .ttc and .dfont to .ttf using FontForge
#!/usr/local/bin/fontforge
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc
fonts = FontsInFile($1)
n = SizeOf(fonts)
i = 0
while (i < n)
Open($1 + "(" + fonts[i] + ")", 1)
index = ToString(i + 1)