This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--force-dark-mode | |
--enable-features=WebUIDarkMode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Input: a string of digits (w/o the check digit) | |
// Output: the check digit | |
// Universal algo - smallest option so far (67 chars after the assignment): | |
luhn=s=>(10-[...s].reverse().reduce((a,v,i)=>a+v*(i&1?1:2.2)|0,0)%10)%10 | |
// IMEI version (14-digit or any other even-digit input) - smallest option so far (57 chars after the assignment): | |
luhnImei=s=>(10-[...s].reduce((a,v,i)=>a+v*(i&1?2.2:1)|0,0)%10)%10 | |
// Credit card version (15-digit or any other odd-digit input) - smallest option so far (57 chars after the assignment): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Telememer: a JS library to encode/decode information to/from Casio module 2747/5574 Telememo 30 format | |
// Supports up to 378 bytes of raw binary data | |
// Requires BigInt support in the browser's or other JS engine | |
// Created by Luxferre in 2023, released into public domain | |
// Made in Ukraine | |
Telememer = (params => { | |
var nameAlphabet = params[0], | |
digitAlphabet = params[1], | |
indexAlphabet = params[2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* TinyOLC - Open Location Code for smallest applications | |
* Differences from Google's open-source JS implementation: | |
* - less than 600 bytes minified (as opposed to over 4.5 KB from Google) | |
* - only 2 methods exposed - encode (lat, lng => str) and decode (str => [lat, lng]) | |
* - only floating point degrees accepted as encoding input (positive as N and E, negative as S and W) | |
* - no short code resolution | |
* - no area encoding, only points with 11-digit resolution | |
* - assuming the block lower left corner only when decoding a low-res code | |
* - no validation checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//USB I/O class for WebUSB | |
//(c) Luxferre 2020-present | |
class USBIO { | |
//Possible devFilter fields: classCode, subclassCode, protocolCode, vendorId, productId, serialNumber (not recommended) | |
constructor(devFilter = {}) { | |
this.requestDeviceObject = {filters:(devFilter ? [devFilter] : [])} | |
this.devFilter = devFilter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MTPhreak IMEI changer and randomizer for MediaTek NVRAM | |
-- This version is adapted specifically for the Sigma sKai and other MT6572 based phones | |
-- Usage: lua mtphreak-6572.lua NVRAMfile [imei1 [imei2]] | |
-- If no IMEIs are passed, they are randomized (with respect to Luhn checksum) | |
function parseImei(imeistr) -- imei string to 12-byte table | |
local imeiTbl = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | |
for i = 1, 15 do | |
local digit = tonumber(imeistr:sub(i,i)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Simple script to enter the necessary boot mode in the MT6572-based (etc) phones | |
# Depends on pyserial, otherwise fully cross-platform | |
# Usage: python3 mtk-bootseq.py [MODECMD] [port] | |
# e.g. python3 mtk-bootseq.py FASTBOOT /dev/tty.usbmodem14200 | |
# and then connect the cable and repeatedly short-press the power on key | |
# Supported commands depend on the device and its preloader. Here's the list for Sigma S3500 sKai: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE theme PUBLIC "-//NOKIA//DTD THEME 1.1//EN" "theme.dtd"> | |
<!-- | |
This is an example theme_descriptor.xml for Nokia 8800 Classic/Special (not Sirocco or Arte) | |
that can be used freely as a complete reference template to create other themes | |
Compilation: cd theme_dir && zip -9 ../MyExampleTheme.nth ./* | |
Note: all resource files MUST be present in the archive's root, no subdirectories! | |
--> | |
<theme name="MyExampleTheme" version="1.1"> | |
<!-- (all icons and wallpapers hereafter can be of JPEG, PNG, BMP or GIF format, including animations) --> |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Novocarina: a fully 3D-printable ocarina with a side pendant loop and customizable inside bottom branding | |
* Optimized PLA settings: 20% infill, 0.3mm layer height, 10mm brim | |
* | |
* Key: C | |
* | |
* It has some differences from a standard 4-hole English pendant system ocarina: | |
* due to the nature of 3D printing in PLA, some tones actually have different keying | |
* (don't believe your musical tuners since they can't pick up any overtones, | |
* and these overtones play a very important role in shaping final pitch here). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Optimizing decompiler of a binary STL into the OpenSCAD polyhedron module | |
* @license Unlicense | |
* | |
* @param {ArrayBuffer} stl STL file contents (binary flavor) | |
* @param {string} optional custom name for OpenSCAD object (if none passed then 'object{NumTriangles}' will be used) | |
* @returns {string} ready OpenSCAD script | |
*/ | |
function STL2SCAD(stl, optModName = null) { | |
var totalTriangles = new Uint32Array(stl.slice(80, 84))[0], //triangle amount is LE uint at byte 80 |
NewerOlder