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
// Convert all images in directory | |
ffmpeg -framerate 30 -pattern_type glob -i '*.png' -pix_fmt yuva420p _export.webm | |
// For image names frame-1.png, frame-2.png, frame-3.png, etc. | |
ffmpeg -framerate 30 -i frame-%d.png -pix_fmt yuva420p _export.webm | |
// For image names frame-00001.png, frame-00002.png, frame-00003.png, etc. (5 apparently stand for the length of the number) | |
ffmpeg -framerate 30 -i frame-%05d.png -pix_fmt yuva420p _export.webm |
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
<button id="show">Show</button> | |
<div id="popup"> | |
<button id="option1">Option 1</button> | |
<button id="option2">Option 2</button> | |
<button id="option3">Option 3</button> | |
<button id="option4">Option 4</button> | |
<button id="option5">Option 5</button> | |
</div> | |
<div id="result"></div> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> |
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
var paths = [ | |
["Account"], | |
["Account", "Payment Methods"], | |
["Account", "Payment Methods", "Credit Card"], | |
["Account", "Payment Methods", "Paypal"], | |
["Account", "Emails"], | |
["Account", "Emails", "Main Email"], | |
["Account", "Emails", "Backup Email"], | |
["Account", "Devices"], | |
["Account", "Devices", "Google Pixel"], |
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
getSquare(5) | |
.then(function(result){ | |
console.log(result) | |
}) | |
function getSquare(input) { | |
return new Promise(function(resolve, reject) { | |
var output = input*input | |
resolve(output) | |
}); |
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
// Adapted from https://stackoverflow.com/questions/5674149/3d-coordinates-on-a-sphere-to-latitude-and-longitude | |
// Coordinates will be between -180,180 (lon) and -90,90 (lat) | |
function sphericalPointsToCoordinates(points) { | |
var coordinates = []; | |
for (var i = 0; i < points.length; i++) { | |
var point = points[i]; | |
var coordinate = sphericalPointToCoordinate(point); | |
coordinates.push(coordinate); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title>Fibonacci Sphere in ThreeJS</title> | |
<style> | |
body { | |
margin: 0; | |
} |
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
function getBoundsZoomLevel(bounds, mapWidth, mapHeight) { | |
// Adjusted from https://stackoverflow.com/a/13274361 | |
var WORLD_DIM = { height: 256, width: 256 }; | |
var ZOOM_MAX = 21; | |
function latRad(lat) { | |
var sin = Math.sin(lat * Math.PI / 180); | |
var radX2 = Math.log((1 + sin) / (1 - sin)) / 2; | |
return Math.max(Math.min(radX2, Math.PI), -Math.PI) / 2; | |
} |
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
<div id="doNotTrack">You won't be tracked</div> | |
<script type="text/javascript"> | |
function initDoNotTrackDetect() { | |
if (isDoNotTrackEnabled() == false) { | |
loadjscssfile("assets/scripts/analytics.js", "js") | |
} else { | |
document.getElementById('doNotTrack').style.display = 'none'; | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
<style type="text/css"> | |
body { | |
background-color: #ECECEC; | |
font-family: sans-serif; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Camera</title> | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<style type="text/css"> | |
.cameraRoll { |