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
window.addEventListener('click', evt => { | |
if (evt.shiftKey || evt.altKey || evt.metaKey) { | |
return; | |
} | |
const linkEl = evt.target && evt.target.closest('a[href]'); | |
if (linkEl && linkEl.hostname.endsWith('vimeo.com')) { | |
evt.preventDefault(); | |
evt.stopPropagation(); | |
window.location.href = linkEl.href; | |
} |
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/sh | |
# `adb` commands to call for capturing high-res videos on Oculus VR headsets | |
# | |
# Usage: | |
# | |
# curl https://gist.githubusercontent.com/cvan/54535a41db8a67d0370971f6e393675d/raw/c2183adf4bf0e85edc422a13599eba54e62ee473/video-setprop.sh > /tmp/oculusvr-video-setup.sh | |
# chmod +x /tmp/oculusvr-video-setup.sh | |
# ./tmp/oculusvr-video-setup.sh | |
# |
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
/** | |
* QSUtils: a query-string utility for browser/client-side JavaScript. | |
* | |
* supports case-insensitive, truthy, typed values, defaults. | |
* | |
* demo: https://qsutils.glitch.me/ | |
*/ | |
class QSUtils { | |
constructor () { | |
this.qs = new URLSearchParams(window.location.search); |
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
adb shell getprop > props__$(date +%F_%T).ini |
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
// 1. Ensure you are signed in (if not, visit https://vimeo.com/log_in). | |
// 2. Set `VIMEO_CHANNEL_ID` below to the channel ID corresponding to the channel you want to add the video to. | |
// The channel ID appears at the end of the channel URL (e.g., https://vimeo.com/channels/1434599). | |
// See the other script for a snippet to run to navigate to your list of channels. | |
// 3. If you're logged in, from a video page on Vimeo, enter this in the Console from your browser's Dev Tools: | |
VIMEO_CHANNEL_ID = 1434599; document.querySelector('.collections-button').click(); setTimeout(() => { document.querySelector(`input[id="${VIMEO_CHANNEL_ID}"]`).checked = true; }, 500); window.close(); |
Using Myk Melez's qbrt
project, @cvan's maintained a forked branch, vr
, as the foundation for building a standalone, self-contained executable of Desktop Firefox w/ enabled-by-default WebVR Support.
Done in March β April 2017 at Mozilla in the Mixed Reality program, this experiment was led by @cvan and @caseyyee, codenamed Moonrise.
- Moonrise could generate Windows, macOS, and Linux releases of a wrapper program of this branch of
qbrt
. - Moonrise's default start page was a WebVR-powered Lobby experience
- Moonrise could connect to a user's Steam account (if the user was already locally authenticated in the Steam app, Steam's user-management APIs worked witho
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
// Source: https://gist.github.com/cvan/d37e7d78ce114ba15e3736af18acfdac | |
// Author: CVAN <https://cvan.io> | |
const fs = require('fs'); | |
const os = require('os'); | |
const path = require('path'); | |
// Source: https://gist.github.com/cvan/ef28f73b88b991d4a9705314b2af2e78#file-system-js | |
// Author: CVAN <https://cvan.io> | |
// Useful helper snippet for understanding the capabilities of a user's system from Node.js' built-in `process.arch` and `process.platform`. | |
const system = { |
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 os = require('os'); | |
// See docs: https://nodejs.org/api/os.html | |
const usage = {}; | |
usage[`require('os').type()`] = { | |
value: os.type(), | |
otherValues: [ | |
'Linux', 'Darwin', 'Windows_NT' | |
], |
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
// Source: https://gist.github.com/cvan/da899090fa6c38f87dacbef95ea5d785#file-downloader-js | |
// Author: CVAN <https://cvan.io> | |
const fs = require('fs'); | |
const http = require('http'); | |
const https = require('https'); | |
const path = require('path'); | |
const URL = require('url'); | |
const utils = {}; | |
utils.getSafeTimestamp = () => new Date().toISOString().slice(0, 23).replace(/:/g, '.'); |