Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
| # ffmpeg combo: equirect-to-cubemap (standard 6 faces + yaw:45° 4 horiz faces) | |
| ffmpeg -i input.mp4 -filter_complex [0:v]split=2[in1][in2];[in1]v360=equirect:c3x2:out_forder=frblud,untile=3x2[out1];[in2]v360=equirect:c6x1:out_forder=frblud:yaw=45,crop=4/6*in_w:in_h:0:0,untile=4x1[out2] -map [out1] cubemap2\cubemap_frblud_%05d.jpg -map [out2] cubemap2\cubemap_45_frbl_%05d.jpg | |
| # from equirectangular to standard cubemap | |
| ffmpeg -i input.mp4 -vf "v360=equirect:c3x2:out_forder=frblud,untile=3x2" cubemap\cubemap_frblud_%05d.jpg | |
| # from equirectangular to standard yaw:45° cubemap (no top/bottom) | |
| ffmpeg -i input.mp4 -filter_complex "v360=equirect:c6x1:out_forder=frblud:yaw=45,crop=4/6*in_w:in_h:0:0,untile=4x1" cubemap\cubemap_45_frbl_%05d.jpg | |
| # from equirectangular to 90° rectilinear persp | |
| ffmpeg -i input.mp4 -vf "v360=e:rectilinear:h_fov=90:v_fov=90" output.mp4 |
| from django.forms import BaseInlineFormSet, Media | |
| class BaseInlineNestedFormSet(BaseInlineFormSet): | |
| """ | |
| Classe usada para criar formsets aninhados | |
| Example: | |
| class NestedFormSet(BaseInlineNestedFormSet): | |
| nesteds = { | |
| "prefix": FormSet, |
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.
Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.
| let mix = require("laravel-mix"); | |
| let tailwindcss = require("tailwindcss"); | |
| let glob = require("glob-all"); | |
| let PurgecssPlugin = require("purgecss-webpack-plugin"); | |
| /** | |
| * Custom PurgeCSS Extractor | |
| * https://github.com/FullHuman/purgecss | |
| * https://github.com/FullHuman/purgecss-webpack-plugin | |
| */ |
| /** | |
| * @author knee-cola / https://github.com/knee-cola | |
| * Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1 | |
| */ | |
| // This is a simple progressive image loader for Three.js | |
| // It enables the smaller image files to be loaded first, | |
| // before the big texture image is fully loaded. | |
| // | |
| // The images are loaded in the order they are passed |
Permalink: git.io/vps
| Provider | Type | RAM | Cores | Storage | Transfer | Network | Price |
|---|
| // Events (Plucked out of backbone.js source) | |
| // --------------- | |
| // A module that can be mixed in to *any object* in order to provide it with | |
| // a custom event channel. You may bind a callback to an event with `on` or | |
| // remove with `off`; `trigger`-ing an event fires all callbacks in | |
| // succession. | |
| // | |
| // var object = {}; | |
| // _.extend(object, Backbone.Events); |
| import _ from 'underscore'; | |
| import '../lib/gsap/TweenMax'; | |
| import '../lib/preloadjs-0.6.1.combined'; | |
| import EventEmitter from '../util/event-emitter'; | |
| class CanvasPlayer { | |
| constructor(opts) { | |
| this.opts = _.defaults(opts || {}, this.getDefaultOpts()); | |
| this.state = this.getInitialState(); |
| After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work. | |
| The error was something like "database files are incompatible with server". | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default | |
| brew unlink postgresql | |
| brew install postgresql95 | |
| brew unlink postgresql95 | |
| brew link postgresql |