Skip to content

Instantly share code, notes, and snippets.

@whatisor
whatisor / gist:d9ed79e37cf8270f7d0e3dcb4dab85a4
Created July 16, 2021 04:10
Remove Child Of constrain keep transformation
1. Ctrl + A -> Visual Transform
2. Remove/disable Child Of constrain.
@whatisor
whatisor / gist:2151118a17f2be6b0f500146cf0cec93
Created February 5, 2022 03:33
Fix apt install dependencies broken
sudo apt --fix-broken install
@whatisor
whatisor / ubuntu-nodejs-install.sh
Created March 24, 2022 16:11
How to install nodejs in ubuntu
cd ~
curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
sudo bash /tmp/nodesource_setup.sh
sudo apt install nodejs
node -v
#you can change version in setup_16.x like setup_14.x
@whatisor
whatisor / open-port-ubuntu
Created May 15, 2022 19:09
Open port ubuntu command line
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
@whatisor
whatisor / windows-rdp-microphone
Created May 16, 2022 16:20
rdp enable audio capture
audiocapturemode:i:1
audiomode:i:1
@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)
@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 / 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 / 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 / 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