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
// N.B. Consider disabling `addTypename` in InMemoryCache instead, if applicable | |
/* | |
const client = new ApolloClient({ | |
... | |
cache: new InMemoryCache({ | |
addTypename: false, | |
}), | |
... | |
}); | |
*/ |
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
let pseudoStyleRules: any = { | |
':hover': [], | |
':visited': [], | |
}; | |
function removeMatchingSubstrings(str: string, patterns: string[]) { | |
const regex = new RegExp(patterns.join('|'), 'g'); | |
return str.replace(regex, ''); | |
} |
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
alert("Hello world!"); |
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
import glob | |
import os | |
scss_files = glob.glob('**/patterns/**/*.scss', recursive=True) | |
main_scss = "" | |
working_dir = os.getcwd() | |
for file in scss_files: |
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
import glob | |
import re | |
base_url = "http://localhost:8000/pattern-library/render-pattern/patterns" | |
pattern_libray_pages = glob.glob('**/patterns/pages/**/*.html', recursive=True) | |
config = """module.exports = { | |
defaults: { | |
standard: "WCAG2AAA", |
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
# Please adapt the file paths according to your project conventions. | |
import glob | |
import re | |
base_url = "http://localhost:8000/pattern-library/render-pattern/patterns" | |
# /render-pattern/ loads the pattern in full page view without the pattern library UI | |
pattern_libray_pages = glob.glob('**/patterns/pages/**/*.html', recursive=True) |
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
let emojis = ['💘','💝','💖','💗','💓','💞','💕','💟','❣️','💔','❤️','🧡','💛','💚','💙','💜','🤎','🖤','🤍','❤️','🔥','❤️','🩹','💯','♨️','💢','💬','👁️🗨️','🗨️','🗯️','💭','💤','🌐','♠️','♥️','♦️','♣️','🃏','🀄️','🎴','🎭️','🔇','🔈️','🔉','🔊','🔔','🔕','🎼','🎵','🎶','💹','🏧','🚮','🚰','♿️','🚹️','🚺️','🚻','🚼️','🚾','🛂','🛃','🛄','🛅','⚠️','🚸','⛔️','🚫','🚳','🚭️','🚯','🚱','🚷','📵','🔞','☢️','☣️','⬆️','↗️','➡️','↘️','⬇️','↙️','⬅️','↖️','↕️','↔️','↩️','↪️','⤴️','⤵️','🔃','🔄','🔙','🔚','🔛','🔜','🔝','🛐','⚛️','🕉️','✡️','☸️','☯️','✝️','☦️','☪️','☮️','🕎','🔯','♈️','♉️','♊️','♋️','♌️','♍️','♎️','♏️','♐️','♑️','♒️','♓️','⛎','🔀','🔁','🔂','▶️','⏩️','⏭️','⏯️','◀️','⏪️','⏮️','🔼','⏫','🔽','⏬','⏸️','⏹️','⏺️','⏏️','🎦','🔅','🔆','📶','📳','📴','♀️','♂️','⚧','✖️','➕','➖','➗','♾️','‼️','⁉️','❓️','❔','❕','❗️','〰️','💱','💲','⚕️','♻️','⚜️','🔱','📛','🔰','⭕️','✅','☑️','✔️','❌','❎','➰','➿','〽️','✳️','✴️','❇️','©️','®️','™️','#️⃣','*️⃣','0️⃣','1️⃣','2️⃣','3️⃣','4️⃣','5️⃣','6️⃣','7️⃣','8️⃣','9️⃣','🔟','🔠','🔡','🔢','🔣','🔤','🅰️','🆎','🅱️','🆑','🆒','🆓','ℹ️','🆔','Ⓜ️','🆕','🆖','🅾️','🆗','🅿️','🆘','🆙','🆚','🈁' |
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 pointInPolygon(point, vs) { | |
// Taken from https://github.com/substack/point-in-polygon | |
// Nice explainer at https://observablehq.com/@tmcw/understanding-point-in-polygon | |
// ray-casting algorithm based on | |
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html | |
let x = point[0], y = point[1]; | |
let inside = false; | |
for (let i = 0, j = vs.length - 1; i < vs.length; j = i++) { |
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
let time = {t: 0}; | |
const positionToLookAt = new THREE.Vector3(10, 10, 10); | |
const startQuaternion = camera.quaternion.clone(); //set initial angle | |
camera.lookAt(positionToLookAt); | |
const endQuaternion = camera.quaternion.clone(); //set destination angle | |
camera.quaternion.copy(startQuaternion); | |
new TWEEN.Tween(time) | |
.to({t: 1}, 1000) //duration in milliseconds |
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 img = new Image; | |
img.crossOrigin = "Anonymous"; | |
img.onload = function () { | |
ctx_final.drawImage(img, 0, 0, img.width * 0.64, img.height * 0.69); | |
} | |
img.src = 'https://res.cloudinary.com/dvxmjunfv/image/upload/v1605120751/Photos/Dada_artists__group_photograph__1920__Paris.jpg'; |
NewerOlder