Skip to content

Instantly share code, notes, and snippets.

View doxyf's full-sized avatar
🐈‍⬛
farted

doxyf

🐈‍⬛
farted
  • Prague, Czech Republic
  • 10:49 (UTC +02:00)
View GitHub Profile
@doxyf
doxyf / sc2mp4.py
Created March 15, 2025 08:11
Download song from SoundCloud and export it as video with cover easily using the power of python, ytdl(p) and ffmpeg. You need to have them installed as terminal commands.
import requests
import os
from bs4 import BeautifulSoup
ydl_opts = {}
url = input('sc track url: ')
def dwl_vid(url):
r = requests.get(url)
@doxyf
doxyf / kahootCheats.js
Created December 21, 2022 20:40
Without error handling!
const axios = require('axios');
const process = require('process');
var kahid = process.argv[2];
if(!kahid) throw new Error('Please enter valid Kahoot ID (not room ID)')
async function main(){
let r = await axios.get(`https://create.kahoot.it/rest/kahoots/${kahid}/card/?includeKahoot=true`);
let parsed = parseQuestions(r.data.kahoot.questions);
@doxyf
doxyf / morse.js
Created October 31, 2022 16:58
Translate human readable text to morse code
const readline = require('node:readline');
const { stdin: input, stdout: output } = require('node:process');
const rl = readline.createInterface({ input, output });
rl.question('Enter text: ', (answer) => {
console.log(translate(answer));
rl.close()
});
@doxyf
doxyf / InfiniteHttpLoading.js
Created September 2, 2022 08:13
Blasting an infinite stream of 1 byte packets be like
const Net = require('node:net');
const crypto = require('node:crypto');
let server = new Net.Server();
let shake =
`HTTP/2 200 KO
expires: -1
cache-control: private, max-age=0
content-type: text/html; charset=ASCII
@doxyf
doxyf / helloWorld.asm
Last active August 9, 2022 14:03
"Hello, World!" in x86 Assembly
[org 0x7c00]
mov ah, 0x0e
mov bx, helloWorld
print:
mov al, [bx]
cmp al, 0
je end
int 0x10
inc bx
@doxyf
doxyf / fizzBuzz.py
Last active June 20, 2022 19:21
The FizzBuzz thing in Python
def fizzBuzz(num):
if(num % 5 == 0 and num % 3 == 0):
return 'FizzBuzz'
if(num % 3 == 0):
return 'Fizz'
if(num % 5 == 0):
return 'Buzz'
return num
for i in range(100):
@doxyf
doxyf / fizzBuzz.js
Last active June 19, 2022 18:28
The FizzBuzz thing in JavaScript
for (let i = 1; i <= 100; i++) {
console.log(fizzBuzz(i));
};
function fizzBuzz(num){
if(num % 5 == 0 && num % 3 == 0) return 'FizzBuzz';
if(num % 3 == 0) return 'Fizz'
if(num % 5 == 0) return 'Buzz'
return num;
};
@doxyf
doxyf / pi.js
Created March 27, 2022 15:46
PI digits generator in NodeJS
const process = require('process');
const fs = require('fs');
let digits = process.argv[2] ?? 9999
let i = 1n;
x = 3n * (10n ** (BigInt(digits) + 20n));
let pi = x;
let pistr16;
let started = new Date();
let digitsCounted;