Skip to content

Instantly share code, notes, and snippets.

/*
1. Go to https://www.typingstudy.com and select which lesson you want to cheat.
2.1 Press and hold "Space bar" and some letter until the test finish.
2.2 Do the test until you see your typing resault.
3. Open developer tools' console and paste this code, then hit enter.
4. Edit "Exercise time" and "typing speed" to anyting you want by use inspector(Firefox) or Elements(Chrome).
*/
for (let e of document.getElementsByClassName("result")) {
e.innerHTML = e.innerHTML.slice(e.innerHTML.indexOf("/") + 1) + "/" + e.innerHTML.slice(e.innerHTML.indexOf("/") + 1);
e.style = "background-position:500px 0;";
/*
เขียนมาใช้ในโปรเจ็กย่อย ซึ่งต้องเก็บ follower/following ของคนใน ig
วิธีใช้ก็ ไปดู follower/following ของคนที่อยากเก็บ ไถๆชื่อไปให้หมดหน้า
แล้วก็ก็อบโค้ดไปใส่ใน developer tools กด enter ก็จะได้ array ไปใช้
แนะนำให้เปิด responsive design mode (firefox), device toolbar (chrome/edge)
ไว้เป็นแบบมือถือด้วยเพราะส่วนตัวรู้สึกว่ามันไถง่ายกว่า
*/
@Silica163
Silica163 / node-server.js
Last active August 12, 2023 13:21
host static website in node js
const http = require('http');
const path = require('path');
const fs = require('fs');
const contentType = {
".avif": "image/avif",
".bmp": "image/bmp",
".gif": "image/gif",
".ico": "image/vnd.microsoft.icon",
".jpeg": "image/jpeg",
//https://humanbenchmark.com/tests/reactiontime
//refresh page then paste this code in console and hit enter
var ev = new Event("mousedown"),id,s=0;
function run(){
id = setInterval(()=>{
var score = document.getElementsByClassName("view-score")[0],
go = document.getElementsByClassName("view-go")[0],
waiting = document.getElementsByClassName("view-waiting")[0],
result = document.getElementsByClassName("view-result")[0];
@Silica163
Silica163 / remove activate windows watermark.md
Last active July 22, 2023 07:16
Save all unsave file then run this script in command prompt as administrator.

Explanation

taskkill /f /im explorer.exe stop all image process of explorer.exe

shutdown /r /t 0 restart the computer