Skip to content

Instantly share code, notes, and snippets.

View farshed's full-sized avatar
🦀
Just following my world line

Faisal Arshed farshed

🦀
Just following my world line
View GitHub Profile
@farshed
farshed / server.js
Last active November 27, 2022 08:27
Minimal localhost file server with TS support
const http = require('http');
const subproc = require('child_process');
const serveStatic = require('serve-static');
let compilelock = false;
const server = http.createServer((req, res) => {
if (!compilelock && req.url?.includes('.js')) {
compilelock = true;
compileTS()
@farshed
farshed / ytdl_playlist.sh
Last active September 27, 2021 09:05
Install youtube-dl from https://github.com/ytdl-org/youtube-dl#installation, replace <PLAYLIST_ID> with your playlist's id and run.
youtube-dl -ciw --playlist-start 1 -o "%(playlist_index)s-%(title)s.%(ext)s" 'https://www.youtube.com/playlist?list=<PLAYLIST_ID>'
@farshed
farshed / Kotlin.sublime-build
Last active July 20, 2020 08:58
Sublime Text 3 build system config to compile and run Kotlin programs
{
"cmd": ["kotlinc $file -include-runtime -d $file_base_name.jar && java -jar $file_base_name.jar"],
"selector": "source.kotlin",
"file_patterns": ["*.kt"],
"shell": true
}