Skip to content

Instantly share code, notes, and snippets.

View yeataro's full-sized avatar
💭
foobar

Yea Chen yeataro

💭
foobar
View GitHub Profile
@yeataro
yeataro / Regular expression to clear the number of lines of code in the TD debug console
Created November 3, 2023 18:21
Regular expression to clear the number of lines of code in the TD debug console
^\d*:\s*
1: #version 460
2: #extension GL_EXT_nonuniform_qualifier : enable
3: #extension GL_GOOGLE_include_directive : enable
4:
5:
6: uniform sampler2D sTDNoiseMap;
7: uniform sampler1D sTDSineLookup;
@yeataro
yeataro / calib_test_numpy.py
Created November 10, 2020 21:13 — forked from astraw/calib_test_numpy.py
computing the OpenGL projection matrix from intrinsic camera parameters
#!/usr/bin/env python
# stdlib imports
import os
#other imports
import numpy as np
import scipy.misc
import matplotlib.pyplot as plt
@yeataro
yeataro / GoPro-HerobusPinout.md
Created October 30, 2020 10:43 — forked from orangkucing/GoPro-HerobusPinout.md
Herobus pinout of GoPro Hero 3+ Black
pin I/O label description remark
1 - GND ground
2 I/O I2CSCL I²C clock (pulled up by camera)
3 I/O I2CSDA I²C data (pulled up by camera)
4 - GND ground
5 I BATTIN battery input
6 I BATTIN battery input
7 O 3V8OUT unregulated power out 3.8V 0V when camera is off.
8 O 3V8STBY unregulated power out 3.8V always keep 3.8V unless battery is out.
@yeataro
yeataro / Drag-and-drop-Install-TouchDesigner-Experimental-Del-useless.bat
Last active September 9, 2019 13:59
Installing Multiple TouchDesigner Builds at Once. No need to enter any command line. Just Drag and drop.
@Echo off
IF "%~nx1" == "" GOTO NOdrag
SET FOLDER=%~d1%~p1%~n1
MD %FOLDER%_temp
ECHO Extracting %~n1 ...
%~f1 /extract "%FOLDER%_temp"
ECHO Done.
ECHO Extracted %~nx1 to %FOLDER%_temp\
ECHO Delete Useless files...
DEL /Q %FOLDER%_temp\*
@yeataro
yeataro / encode.sh
Created July 5, 2019 13:40 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output
#version 330
#extension GL_NV_gpu_shader5 : enable
#extension GL_NV_bindless_texture : enable
#extension GL_ARB_shading_language_include : enable
/** BEGIN TD COMMON UTIL UNIFORMS Garbagesdmwk7**/
uniform sampler2D sTDNoiseMap;
uniform sampler1D sTDSineLookup;
uniform sampler2D sTDWhite2D;
uniform sampler3D sTDWhite3D;
uniform sampler2DArray sTDWhite2DArray;
@yeataro
yeataro / InkscapeBatchConvert.bat
Created April 17, 2019 08:36 — forked from JohannesDeml/README.md
Batch converter for windows using inkscape and the command line
@Echo off
set "inkscapePath=C:\Program Files\Inkscape\inkscape.exe"
set /a count=0
set validInput1=svg
set validInput2=pdf
set validInput3=eps
set validOutput1=eps
set validOutput2=pdf
set validOutput3=png
#!/bin/bash
# UPDATE RPI
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install git -y
# OPENFRAMEWORK
cd ~/
#!/usr/bin/python
# A Wake on LAN program that allows you to send magic packets over the Internet
import socket, struct
class Waker():
def makeMagicPacket(self, macAddress):
# Take the entered MAC address and format it to be sent via socket
splitMac = str.split(macAddress,':')
# Pack together the sections of the MAC address as binary hex