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
clearInterval(window.scoreClearInterval);window.scoreClearInterval = setInterval(()=>{document.querySelectorAll(".user-tagline-rating,.rating-score-rating,.rating-score-change,.user-rating-rating,.user-rating,.game-over-message-component,.game-start-message-component").forEach(elem=>elem.innerHTML="")},300) |
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
sudo apt install build-essential git nodejs htop curl -y; | |
sudo apt update;sudo apt upgrade -y; | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash; | |
nvm install v17.9.1; | |
npm install --global yarn; |
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
sqlite3 -json build/fineli.db "SELECT | |
cv.food_id, | |
GROUP_CONCAT(cv.value) AS Valuelist, | |
GROUP_CONCAT(c.description) AS Desclist, | |
f.name AS name | |
FROM component_value cv | |
JOIN food f ON f.id = cv.food_id | |
INNER JOIN components c ON c.id = cv.component_id | |
JOIN units u ON u.id = c.unit_id | |
JOIN component_class cc ON cc.id = c.component_class_id |
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
G|---------| | |
D|---------| | |
A|---------| | |
E|---------| | |
2x F7 E7 Am F7 E | |
G|-------------|-------------|--------------|-----------| | |
D|----3----2-- |----------2--|---3-----3----|----2------| | |
A|-------------|----7--------|---3----------|----2------| | |
E|--1----0-----|--5---2------|-1---1--------|--0-----0--| | |
F7 E7 Am F7 E7 Am |
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
Show hidden characters
{ | |
"presets": [ | |
"latest", | |
"stage-1" | |
], | |
"plugins": [ | |
"transform-object-assign", | |
"transform-decorators-legacy", | |
[ | |
"transform-react-jsx", |
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 list = [ | |
"someJsonUrl", | |
"someJsonUrl", | |
"someJsonUrl" | |
].map((url) => fetch.bind(null, url)); | |
function sequentialPromise(promiseFuncList) { | |
return new Promise((resolve, reject) => { | |
const resultsList = []; | |
promiseFuncList.reduce((accPromise, nextPromiseFunc, i, arr) => { |
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 seatIds = | |
getInput() | |
.replace(/[BR]/g,"1") | |
.replace(/[FL]/g,"0") | |
.split("\n") | |
.map(line=>line.trim()) | |
.map(line=>({row:parseInt(line.slice(0,7),2),column:parseInt(line.slice(7),2)})) | |
.map(obj=>({...obj,seatId:obj.row*8+obj.column})) | |
.map(e=>e.seatId) | |
//A: |
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
[ | |
{ | |
"name": "Alko Akaa Toijala", | |
"address": "Valtatie 1, 37800 TOIJALA", | |
"lat": "61.16822725", | |
"lon": "23.8673481114683" | |
}, | |
{ | |
"name": "Alko Alajärvi", | |
"address": "Yrittäjäntie 5, 62900 ALAJÄRVI", |
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 hrefs = | |
Array.from(document.querySelectorAll("a")) | |
.map(link=>link.href) | |
.sort() | |
.filter((el,i,arr)=>!arr.slice(i+1).includes(el)) | |
.filter(href=>href.match(/ads\/\d/)) | |
.filter((_,i,arr)=>i ? (console.log(arr.length),true):true) | |
.filter(href=>(console.log(href),true)).slice(0); | |
window.array = []; | |
hrefs.forEach((href,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
function betterRgbToHsl(r, g, b) { | |
r /= 255, g /= 255, b /= 255; | |
var max = Math.max(r, g, b), min = Math.min(r, g, b); | |
var h, s, l = (max + min) / 2; | |
if (max == min) { | |
h = s = 0; // achromatic | |
} else { |
NewerOlder