Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@guidoschmidt
guidoschmidt / install.sh
Last active August 17, 2019 21:07 — forked from Danw33/install.sh
macOS Homebrew Install FFMPEG --with all options
2019
brew install nasm pkg-config texi2html aom fontconfig freetype frei0r gnutls lame libass libbluray libsoxr libvorbis libvpx opencore-amr openjpeg opus rtmpdump rubberband sdl2 snappy speex tesseract theora x264 x265 xvid xz
brew install ffmpeg
@guidoschmidt
guidoschmidt / LICENSE
Created August 5, 2019 08:13 — forked from JohannesMP/LICENSE
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@guidoschmidt
guidoschmidt / billboard_hbao.frag
Created June 11, 2019 22:50 — forked from bassemhermina/billboard_hbao.frag
WebGL GLSL HBAO (Horizon-Based Ambient Occlusion) fragment shader. HBAO is a higher quality approach for computing SSAO (Screen-Space Ambient Occlusion) developed by Nvidia in 2008. Converts the g-buffer to an occlusion buffer which estimates local ambient occlusion at each fragment in screen-space. Specifically, the technique views the depth bu…
// number of directions to sample in UV space
#define NUM_SAMPLE_DIRECTIONS {{ numSampleDirections }}
// number of sample steps when raymarching along a direction
#define NUM_SAMPLE_STEPS {{ numSampleSteps }}
#define APPLY_ATTENUATION {{ attenuation }}
#define USE_ACTUAL_NORMALS {{ useActualNormals }}
@guidoschmidt
guidoschmidt / mysql-docker.sh
Created June 7, 2019 08:31 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
I use the QNAP nas server to host docker containers. We can configure
this mac to run docker-machine and point to the qnap server to deploy or
otherwise mess with docker.
This is how we set that up:
docker-machine create --driver=none --url tcp://<your qnap box>:2376 qnap
Next we need to install the certs. Download them from within the QNAP
@guidoschmidt
guidoschmidt / controllers--contact.php
Created March 18, 2019 11:30 — forked from bastianallgeier/controllers--contact.php
Plain contactform example for Kirby 2
<?php
return function($site, $pages, $page) {
$alert = null;
if(get('submit')) {
$data = array(
'name' => get('name'),
@guidoschmidt
guidoschmidt / GLSL-Noise.md
Created September 29, 2018 13:35 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@guidoschmidt
guidoschmidt / git-cheatsheet.md
Last active August 1, 2018 06:35
Git Cheatsheet
  • Log all commits that happended in the last 356 days, sort them and filter for (less|css|sass|scss)

git log --name-only --since="365 days" | sort -u | awk '/\.(le|c|sa|sc)ss$/{print}' | nl

const sketcher = require('canvas-sketch-tool'); // not yet public
const seedRandom = require('seed-random');
const settings = {
// Output resolution, we use a high value for print artwork
pixelsPerInch: 300,
// US Letter size 8.5x11 inches
dimensions: [ 8.5, 11 ],
// all our dimensions and rendering units will use inches
units: 'in'
@guidoschmidt
guidoschmidt / Autofade
Last active March 5, 2018 14:01
After Effects Expressions
//Autofade: Add to opacity
transition = 20; // transition time in frames
if (marker.numKeys<2){
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds
linear(time, inPoint, inPoint + tSecs, 0, 100) - linear(time, outPoint - tSecs, outPoint, 0, 100)
}else{
linear(time, inPoint, marker.key(1).time, 0, 100) - linear(time, marker.key(2).time, outPoint, 0, 100)
}