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
/* | |
To use: | |
-open amazon product page | |
-click "see all reviews" and scroll to bottom of page to load all reviews | |
-copy and paste this code into console | |
-repeat on pages 2,3,4 etc | |
*/ | |
let allReviews = ""; |
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 CARD_CLASS = ".Yl-.MIw.Hb7"; | |
const CARD_TITLE = ".tBJ.dyH.iFc.j1A.O2T.zDA.IZT.H2s.CKL" | |
document.querySelectorAll(CARD_CLASS).forEach(el => { | |
console.log(el); | |
const titleEls = el.querySelectorAll(CARD_TITLE); | |
if (titleEls.length !== 2) { | |
el.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
/* | |
To use: | |
-Go to a tiktok account page | |
-Keep scrolling to the bottom to load up as many videos as possible | |
-open the browser console (right click on page -> click inspect -> click the console tab) | |
-copy the code below and paste into the console | |
-press enter | |
-give it a few seconds if a lot of videos are loaded | |
-you should see only videos with 1M+ views |
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
float map(float value, float min1, float max1, float min2, float max2) { | |
return min2 + (value - min1) * (max2 - min2) / (max1 - min1); | |
} | |
float osc(float low, float high, float speed) { | |
return map(sin(iTime * speed), -1.0, 1.0, low, high); | |
} |
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
/* | |
taken from: https://gist.github.com/ayamflow/96a1f554c3f88eef2f9d0024fc42940f | |
// Basically solving an AAS triangle https://www.mathsisfun.com/algebra/trig-solving-aas-triangles.html | |
https://i.stack.imgur.com/PgSn3.jpg | |
*/ | |
// return height and width of plane that covers viewport at the given plane z position | |
export default (camera, planeZ, viewWidth, viewHeight) => { | |
const cameraZ = camera.position.z; |
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 addFunc(num) { | |
return [].concat(this).map(item => item + num); | |
} | |
// add method 'addToArr' to Array prototype | |
Object.defineProperty(Array.prototype, 'addToArr', { | |
value: addFunc | |
}); | |
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
<svg | |
id="Layer_1" | |
data-name="Layer 1" | |
xmlns="http://www.w3.org/2000/svg" | |
viewBox="0 0 96.92 27.47" | |
:class="$style.svg" | |
> | |
<!-- MASK --> | |
<defs> | |
<clipPath id="myClip"> |
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
// from www.thebookofshaders.com | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; |
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
THREE.WebGLShader: gl.getShaderInfoLog() vertex | |
ERROR: 0:49: 'fff' : syntax error | |