Skip to content

Instantly share code, notes, and snippets.

View Felix-Kyun's full-sized avatar
💭
¯\_(ツ)_/¯

0×FELIX Felix-Kyun

💭
¯\_(ツ)_/¯
View GitHub Profile
@Felix-Kyun
Felix-Kyun / console.js
Created April 29, 2024 16:42
download view only pdf from google drive
let jspdf = document.createElement( "script" );
jspdf.onload = function () {
let pdf = new jsPDF();
let elements = document.getElementsByTagName( "img" );
for ( let i in elements) {
let img = elements[i];
if (!/^blob:/.test(img.src)) {
continue ;
}
let canvasElement = document.createElement( 'canvas' );
@Felix-Kyun
Felix-Kyun / factorial.js
Created January 14, 2025 17:58
js program to find factorials of larger numbers
const toInt = (str) => str - "0";
function factorial(num) {
num = trimLeadingZero(num);
if (num === "0" || num === "1") return "1";
return stringMultiply(num, factorial(stringSubtract(num, 1)));
}
function trimLeadingZero(num) {