Skip to content

Instantly share code, notes, and snippets.

@whatisor
whatisor / gist:75ab822d5fd1124f3da353631a094954
Created October 1, 2024 19:08
Unity textmeshpro masking not work
2D rect making using workspace coordinate so padding unit is not pixel
@whatisor
whatisor / gist:de2c4c6799e140ceef4513605ca0b657
Created June 7, 2024 15:44
Windows Docker Network Binding
1. Add this line to dockerfile
EXPOSE 8080
2. Use -p 8080:8080 for docker run
3. Allow network when windows popup permission dialog.
1. Install following nvidia docker document, no need their image
2. Build image with ENV NVIDIA_DRIVER_CAPABILITIES all or set it while run
@whatisor
whatisor / gist:ec68c4fe5ed24cdb132d08cf66926563
Created February 2, 2024 19:03
h265_nvenc quality setting
-tune hq -cq 19 -qp 19
@whatisor
whatisor / gist:32718e91bc8f119162e03b45b7ac20fa
Created August 24, 2023 13:42
Unity build failed by permission
Go to C:\Program Files\Unity\Hub\Editor\<unity version>\Editor\Data\PlaybackEngines\AndroidPlayer
Open Property of SDK folder
Open Securty
Select Users to change permission
Grand full control.
Apply
OK
@whatisor
whatisor / gist:5808ddbb8293a6cf3e626da59bc18551
Created April 3, 2023 12:59
python-opengl-pygame-high-accuracy-clock
import pygame
import time
# Initialize Pygame
pygame.init()
# Set the window size
size = (640, 480)
# Create the window
@whatisor
whatisor / gist:0f3098a4d6dcb9904e3b659e654a6f44
Created December 15, 2022 21:35
Oculus cannot launch 3D app from 2D app
From Android Q, an application cannot launch other application if it does not satisfy these update:
https://developer.android.com/guide/components/activities/background-starts
@whatisor
whatisor / Java2Windows
Created August 12, 2022 16:57
IANA to Windows timezone id
https://secure.jadeworld.com/JADETech/JADE2020/OnlineDocumentation/content/resources/encyclosys2/jadetimezone_class/ianawindowstimezonemapping.htm
@whatisor
whatisor / resign-old-commits
Created July 22, 2022 13:53
Resign old commits
1. Find your good commit id : git log
2. git rebase --exec 'git commit --amend --no-edit -n -S' -i <your latest good commit id>
3. just save and quit when prompted
4. git push origin <branch name> --force
@whatisor
whatisor / decoder-h265.py
Created May 19, 2022 19:03
Decode h265 bitstream
#Dependencies: Python 3
# pip install av pillow
import av
import sys
def h265ToJpg():
inputFileName = "rawStream-1-20220519-132954.hevc"
container = av.open(inputFileName)
print("container:", container)
print("container.streams:", container.streams)
print("container.format:", container.format)