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 / 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 / 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
@yeataro
yeataro / ffmpeg-hap-readme.md
Created June 7, 2018 08:49 — forked from dlublin/ffmpeg-hap-readme.md
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@yeataro
yeataro / BitonicSortCS.fx
Created January 23, 2018 12:42 — forked from 43x2/BitonicSortCS.fx
Bitonic sorting in compute shaders
//
// Debug: fxc /E cs_main /T cs_5_0 /Fh (output) /Od /Vn g_BitonicSortCS /Zi (this)
// Release: fxc /E cs_main /T cs_5_0 /Fh (output) /O1 /Vn g_BitonicSortCS (this)
//
// スレッド数
#define THREADS_X 512
// ソート要素数
#define ELEMENTS_TO_SORT ( 1 << 10 )