Contents:
This file contains hidden or 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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/fakeRefract" { | |
Properties { | |
} |
This file contains hidden or 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
import { Selector, ClientFunction } from 'testcafe'; | |
fixture `Let\'s take a look at the new TestCafe` | |
.page `url of delivery service here (hidden not to be an ad)`; | |
test(`Get a pizza`, async t => { | |
await t | |
.click(Selector('#menu-primary-menu').find('li').nth(2)) | |
.switchToIframe('iframe'); |
This file contains hidden or 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
// https://webreflection.medium.com/using-the-input-datetime-local-9503e7efdce | |
Date.prototype.toDatetimeLocal = | |
function toDatetimeLocal() { | |
var | |
date = this, | |
ten = function (i) { | |
return (i < 10 ? '0' : '') + i; | |
}, | |
YYYY = date.getFullYear(), | |
MM = ten(date.getMonth() + 1), |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
rawdir="$1" | |
[ -z "$rawdir" ] && echo "missing dir" && exit | |
dir=$(cd "$rawdir" && pwd) | |
tmp=$(mktemp -d) | |
( |
Transform a React VR CLI project into an OVRUI project.
To get started npm install -g react-vr-cli
for the React VR CLI to make new projects.
Then react-vr init PROJECT_NAME
to create a project directory with all of the React VR code.
From here you can copy the below files into the root and they will automatically reference the node_modules versions of THREE and OVRUI.
Whether your component relies on client-side features or you are using 3rd party components that are not designed for server-side rendering, sometimes you'll want to defer rendering until on the client. For our example, we'll be using react-chart-2 to load a Doughnut chart.
You'll need a next
project and to install chart.js
+ react-chartjs-2
.
$ npm install --save chart.js react-chartjs-2
This file contains hidden or 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
// Implements stale-while-revalidate | |
self.addEventListener('fetch', event => { | |
const cached = caches.match(event.request); | |
const fetched = fetch(event.request); | |
const fetchedCopy = fetched.then(resp => resp.clone()); | |
// Call respondWith() with whatever we get first. | |
// If the fetch fails (e.g disconnected), wait for the cache. | |
// If there’s nothing in cache, wait for the fetch. | |
// If neither yields a response, return a 404. |
This file contains hidden or 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
@-moz-document domain(youtube.com) { | |
.html5-play-progress, .ytp-play-progress { | |
background: #191970 !important; /* Old browsers */ | |
background: -moz-linear-gradient(left, #191970 0%, #191970 100%) !important; | |
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1b1b1b), color-stop(100%,#FFFFFF)) !important; | |
background: -webkit-linear-gradient(left, #191970 0%,#8b0000 100%) !important; | |
background: -o-linear-gradient(left, #191970 0%,#8b0000 100%) !important; | |
background: -ms-linear-gradient(left, #191970 0%,#8b0000 100%) !important; | |
background: linear-gradient(to right, #191970 0%,#006400 50%,#8b0000 100%) !important; |
This file contains hidden or 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 ffmpeg = require('fluent-ffmpeg'); | |
const moment = require('moment'); | |
var myArgs = process.argv.slice(2); | |
//Convert Video | |
var filePath = myArgs[0]; | |
var startTime = moment(myArgs[1], "HH:mm:ss.SSS"); | |
var endTime = moment(myArgs[2], "HH:mm:ss.SSS"); | |
var fileOutput = myArgs[3]; |