Skip to content

Instantly share code, notes, and snippets.

View justintien's full-sized avatar
🍞
Jiapan

Justin Tien (Yi-Ming Tien) justintien

🍞
Jiapan
View GitHub Profile
@justintien
justintien / wmp_h.265_hevc.md
Created August 21, 2024 02:36 — forked from Aldaviva/wmp_h.265_hevc.md
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the x64 appx file, or whatever your Windows architecture is.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .appx filename and save it as that instead.
@justintien
justintien / bytesToSize.js
Created June 1, 2022 08:18 — forked from lanqy/bytesToSize.js
JavaScript To Convert Bytes To MB, KB, Etc
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return 'n/a';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
if (i == 0) return bytes + ' ' + sizes[i];
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
};
@justintien
justintien / get-npm-package-version
Created April 28, 2022 07:37 — forked from DarrenN/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION

前言

這兩年多虧於 VTuber 的盛行,動態捕捉從原先軟硬體價格昂貴難以上手,到現在越來越多適合獨立創作者的軟體盛行,入門的門檻也一天比一天降低許多。此表單整理我這陣子試過適合直播的動態捕捉軟體,包含 Live2D、3D、半身捕捉、全身捕捉等,希望對有興趣的人有幫助,有錯誤或補充資訊也歡迎提出。

Yan-K / 2020.06.08 社群平台:Website | Facebook | Twitter | Plurk | Twitch

【2D】- 免費

PrprLive

@justintien
justintien / JSON-intArray-converter.js
Created February 7, 2021 09:15 — forked from tomfa/JSON-intArray-converter.js
JSON to 8-bit-integer parsing (and visa versa)
// JSON to Uint8Array parsing and visa versa
// (Intended Bluetooth communication on Cordova)
var JsonToArray = function(json)
{
var str = JSON.stringify(json, null, 0);
var ret = new Uint8Array(str.length);
for (var i = 0; i < str.length; i++) {
ret[i] = str.charCodeAt(i);
}
@justintien
justintien / convert-arraybuffer.js
Created February 7, 2021 09:15 — forked from nuclearglow/convert-arraybuffer.js
ArrayBuffer <-> JSON <-> ArrayBuffer
// array buffer to JSON
const dataString JSON.stringify(Array.from(new Uint8Array(arrayBuffer)));
// send around
// JSON to ArrayBuffer
new Uint8Array(JSON.parse(dataString)).buffer
@justintien
justintien / phaser-scenes-summary.md
Created December 19, 2020 15:25 — forked from samme/phaser-scenes-summary.md
Phaser 3 Scenes Summary

Scene control

Calls without a key argument

These affect the calling scene only.

Example:

this.scene.start()

@justintien
justintien / JsonSplitSprite.cs
Created October 28, 2020 13:09 — forked from tsubaki/JsonSplitSprite.cs
Json(exported with texture packer) -> unity 2d Multiple sprite . (request minijson https://gist.github.com/darktable/1411710)
// --
// The MIT License
//
// Copyright (c) 2013 tatsuhiko yamamura
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@justintien
justintien / dockergrep.sh
Created August 10, 2020 15:06 — forked from roylee0704/dockergrep.sh
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@justintien
justintien / YasskON.js
Last active June 12, 2020 16:37
Just note... YsakON
// ref https://stackoverflow.com/questions/34036018/to-print-all-the-paths-in-a-json-object
```js
var YsakON = { // YsakObjectNotation
stringify: function (o, prefix) {
prefix = prefix || 'root'
switch (typeof o) {
case 'object':
if (Array.isArray(o)) { return prefix + '=' + JSON.stringify(o) + '\n' }