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
if (location.protocol != 'https:') { | |
location.href = 'https:' + window.location.href.substring(window.location.protocol.length) | |
} |
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(bitsy) { | |
"use strict"; | |
bitsy = bitsy && bitsy.hasOwnProperty("default") ? bitsy["default"] : bitsy; | |
function inject(searchRegex, replaceString) { | |
// find the relevant script tag | |
var scriptTags = document.getElementsByTagName("script"); | |
var scriptTag; | |
var code; |
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
<html> | |
<script> | |
document.addEventListener("DOMContentLoaded", event => { | |
document.body.removeAttribute("class"); | |
var elementsRemove = document.querySelectorAll("a#top, div#top_title"); | |
for (var el of elementsRemove) { | |
el.parentNode.removeChild(el); | |
} | |
for (var id of [ | |
"globalWrapper", |
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 SerialPort = require('serialport'); | |
const Readline = require('@serialport/parser-readline'); | |
const robot = require('robotjs'); | |
const parser = new Readline(); | |
SerialPort.list(function(err, ports) { | |
var arduinos = ports.filter(isArduino); | |
if (arduinos.length !== 0) { | |
connect( |
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
* { | |
padding: 0; | |
margin: 0; | |
border: 0; | |
background: none; | |
} | |
html { | |
font-size: 62.5%; | |
font-family: system-ui, -apple-system, sans-serif; |
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 lat = '56.937783'; | |
const lon = '12.384565899999984'; | |
const url = `https://api.met.no/weatherapi/locationforecastlts/1.3/?lat=${lat}&lon=${lon}`; | |
fetch(url) | |
.then(response => { | |
console.log('response', response); | |
console.log('response.status:', response.status); | |
console.log('response.statusText:', response.statusText); | |
console.log('response.ok:', response.ok); |
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 SCREEN_WIDTH = window.innerWidth, SCREEN_HEIGHT = window.innerHeight; | |
const createCam = (debug = false) => { | |
let arr = []; | |
for (let i = 0; i < 6; i++){ | |
let camera = new THREE.PerspectiveCamera( 45, SCREEN_WIDTH / SCREEN_HEIGHT, 100, 2000000 ); | |
arr.push( camera ); | |
if (debug){ | |
camera.updateProjectionMatrix(); | |
var helper = new THREE.CameraHelper( camera ); |
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
-- Version 0.6 | |
-- New In 0.5 | |
-- Delay time is now in milliseconds | |
-- Unused vars deleted | |
-- New in 0.6 | |
-- Saves artwork as comment | |
-- Original here: https://github.com/alexjohnj/spotijack/ | |
set delay_time to 0.1 |
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 els = document.querySelectorAll('.views-row'); | |
var newEls = []; | |
for (const el of els){ | |
let productName = el.querySelector('.prd-name').innerHTML; | |
let normalPrice = el.querySelector('span[data-normal-price]').getAttribute('data-normal-price'); | |
let currentPrice = el.querySelector('span[data-cur-price]').getAttribute('data-cur-price'); | |
newEls.push({ | |
el: el, | |
item: productName, | |
normalPrice: normalPrice, |
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
#include <Adafruit_NeoPixel.h> | |
#define DELAY 2000 | |
#define NUM_FLASHES 30 | |
bool strobing = false; | |
bool debug = true; | |
int pirState = LOW; | |
int powerPin = 6; |