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
{ | |
"manifest_version": 2, | |
"name": "Phasing Presence Twitter Extensino", | |
"version": "1.0", | |
"description": "A Twitter extension that draws attention to your presense in reality as you scroll.", | |
"icons": { | |
"48": "icons/icon-48.png", |
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
//Don't use HTML2Canvas as part of a browser extension. Just don't. Trust me. | |
//For more information, see the bottom of the FAQ's at http://html2canvas.hertzen.com/faq | |
setTimeout(function tick() { | |
let timelineContainers = document.querySelectorAll('[aria-label="Timeline: Your Home Timeline"]'); | |
let tweets = timelineContainers[0].children[0].children; | |
let timeline = timelineContainers[0].children[0]; | |
for (let i = 0; i < tweets.length; 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
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'; |
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
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 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
# 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
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
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
alert("Hello world!"); |
OlderNewer