Skip to content

Instantly share code, notes, and snippets.

console.log('testing');
@green6erry
green6erry / admissionStats.js
Last active April 4, 2020 11:33
Georgia Tech OMSCS Reddit admissions thread console snippet
class Post {
constructor(postText) {this.postText = postText}
get status() { return this.filterValue('status');}
get appliedDate() {return this.filterValue('application date');}
get decidedDate() {return this.filterValue('decision date');}
filterValue(str) {
let regEx = new RegExp(str + ':.*', 'gi');
let match = this.postText.match(regEx);
let fieldValue = match && match[0].substring(str.length + 1, match[0].length).trim();
let makeConfetti = () => {
let { height } = document.body.getBoundingClientRect();
const particleQty = 120;
let random = (max) => {
return Math.floor(Math.random() * max);
}
for (let i = 0; i < particleQty; i++) {
let particle = document.createElement('div');
@green6erry
green6erry / thinksterSpacebarVideoControl.js
Last active October 13, 2019 13:36
For anyone using Thinkster.io that wants to be able to pause the video with the spacebar, paste this snippet in your Dev Tools console.
let videoHolder, videoPlayer, videoPlayerContainer, videoOverlay, videoPresent = true;
let setVariables = function() {
try {
videoHolder = document.querySelector('.video-holder');
videoPlayer = videoHolder.querySelector('video');
videoPlayerContainer = videoPlayer.parentElement;
videoOverlay = videoHolder.querySelector('.video-js.vjs-big-play-centered');
} catch(err){
console.log('no video on this page');