Skip to content

Instantly share code, notes, and snippets.

View going-digital's full-sized avatar

Going Digital (Peter Knight) going-digital

View GitHub Profile
@0b5vr
0b5vr / compeko.js
Last active April 3, 2024 03:11
compeko: pack JavaScript into a self-extracting html+deflate
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run
// compeko - pack JavaScript into a self-extracting html+deflate
// v2.0.0
// Copyright (c) 2022-2024 0b5vr
// SPDX-License-Identifier: MIT
// Usage:
// - prepare a js code, which will be fed into `eval`
@cpdt
cpdt / minimal.rs
Last active September 24, 2024 13:18
A minimal Rust file with no_std for sizecoding (4k, 8k, 64k, etc)
#![no_std]
#![no_main]
#![feature(core_intrinsics, lang_items, link_args, alloc, alloc_error_handler)]
#[allow(unused_attributes)]
#[link_args = "/NODEFAULTLIB /SUBSYSTEM:WINDOWS /SAFESEH:NO /DYNAMICBASE:NO /ENTRY:WinMainCRTStartup /LTCG support/msvcrt.lib"]
extern "C" {}
#[macro_use]
extern crate alloc;
@gasman
gasman / pnginator.rb
Created April 30, 2012 18:08
pnginator: pack Javascript into a self-extracting PNG
#!/usr/bin/env ruby -w
# pnginator.rb: pack a .js file into a PNG image with an HTML payload;
# when saved with an .html extension and opened in a browser, the HTML extracts and executes
# the javascript.
# Usage: ruby pnginator.rb input.js output.png.html
# By Gasman <http://matt.west.co.tt/>
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos