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);
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* 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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return function($site, $pages, $page) { | |
$alert = null; | |
if(get('submit')) { | |
$data = array( | |
'name' => get('name'), |
- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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) | |
} |