Skip to content

Instantly share code, notes, and snippets.

@adtac
adtac / Dockerfile
Last active December 26, 2025 00:20
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@furious
furious / frs-vlc_twitch.lua
Last active January 10, 2023 07:05
VLC - Playlist Parser for Twitch streams/videos URLs
--[[
Resolve Twitch channel and video URLs to the actual media URL
Author: furious
How to install? https://wiki.videolan.org/Documentation:Building_Lua_Playlist_Scripts
Don't forget to remove the old "twitch.luac" plugin
OBS: You can choose which quality you want just add ":option" in the url.
If the option isn't available it will fallback to the best quality as normal.
You can also check the console log to see all available quality options.
@derekchiang
derekchiang / app.html
Last active August 31, 2026 04:58 — forked from bellbind/app.html
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
@saintach
saintach / xhrImageDataUrl.js
Created August 1, 2016 04:25
Get data url of an image using xhr
var url = 'path/to/image/file' ;
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
// Set responseType to 'arraybuffer', we want raw binary data buffer
xhr.responseType = 'arraybuffer';
xhr.onload = function() {
@sid24rane
sid24rane / udp.js
Created July 25, 2016 08:39
Simple UDP Client and Server in Node.js ==> ( Echo Server )
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);