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"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>HammerJS Pinch Zoom and Drag</title> | |
<style type="text/css"> | |
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
// Adapted from "How to Limit Color Output with Shaders in Godot" | |
// By TheBuffED | |
// On https://www.youtube.com/watch?v=Scrdv4oSeNw | |
// Type of shader https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html#shader-types | |
shader_type canvas_item; | |
// The shader strength which between 0 (not applied) and 1 (fully applied) because I want to fade the shader in and out | |
// Can be changed from node via `get_material().set_shader_param("shaderStrength", newValue)` | |
uniform float shaderStrength = 1.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
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
<!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
// How to create bookmarklet: https://www.freecodecamp.org/news/what-are-bookmarklets/ | |
javascript: (() => { | |
const gradient = ".ytp-gradient-bottom"; | |
const ui = ".ytp-chrome-bottom"; | |
if(document.querySelector(ui).style.opacity === "0"){ | |
document.querySelector(gradient).style.opacity = 1; | |
document.querySelector(ui).style.opacity = 1; | |
}else{ | |
document.querySelector(gradient).style.opacity = 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
<script type="text/javascript"> | |
let testString = '' | |
testString += '<div style="color: #00A9F8"></div><div style="color: #12345"></div>'; | |
testString += '<div style="color: 00A9F8"></div><div style="color: #123456"></div>'; | |
testString += '<div style="color: #fff"></div><div style="color: #000"></div>'; | |
let regularExpression = /#(?:[0-9a-fA-F]{3}){1,2}/g // btw: this is the same as writing RegExp(/#(?:[0-9a-fA-F]{3}){1,2}/, 'g') | |
let extractedHexCodes = testString.match(regularExpression); |
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
<a id="downloadLink" href="" download="diagram.svg">Download ↓</a> | |
<svg id="svg" width="120" height="120"> | |
<rect fill="#000000" x="10" y="10" width="100" height="100"></rect> | |
</svg> | |
<script type="text/javascript"> | |
setDownloader('downloadLink', 'svg') | |
function setDownloader(linkId, svgId) { | |
// Get svg element |
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 { |
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"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>Drag element</title> | |
<style type="text/css"> | |
#container{ | |
position: absolute; | |
top: 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
const { spawn } = require('child_process'); | |
let queue = ['A', 'B']; | |
let currentlyProcessing = false; | |
const addToQueueContinueWithNext = (newItem) => { | |
queue.push(newItem); | |
checkQueueAndStartIfIdle(); | |
} |
NewerOlder