View olc.js
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 |
View usbio.js
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 |
View mtphreak-6572.lua
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)) |
View mtk-bootseq.py
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: |
View analyzer.xml
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"?> | |
<configuration> | |
<!-- Primary GPT header: --> | |
<!-- MD5: 2bdfbe2dca1cff16f2208cad324ee36f --> | |
<!-- Signature: EFI PART --> | |
<!-- Revision: 65536 --> | |
<!-- Header Size: 92 --> | |
<!-- CRC32 of header: 4F152EE (VALID) => Real: 4F152EE --> | |
<!-- Current LBA: 0x00000001 --> | |
<!-- Backup LBA: 0x00747FFF --> |
View theme_descriptor.xml
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) --> |
View ytdl.js
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
/** | |
* Yet another YouT00be downloader (requiring no third-party NodeJS modules) | |
* Usage: node ytdl.js [video id] | |
* | |
* @license Unlicense | |
*/ | |
const vID = process.argv[2] | |
const qs = require('querystring') | |
const https = require('https') |
View Novocarina.scad
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, |
View stl2scad.js
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 |
View libwallace.js
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
/** | |
* LibWallace: toolbox library for Qualcomm-based and MTK-based phones running KaiOS | |
* | |
* Full support: KaiOS 2.5+ Nokias (Nokia 8110 4G, Nokia 2720 Flip, Nokia 800 Tough) | |
* Partial support: CAT B35, KaiOS 1.0 devices (Alcatel OT-4044O), MTK devices (Sigma S3500 sKai) | |
* | |
* Needs "certified" level in the app manifest. | |
* Requires additional manifest permissions: | |
* | |
* "power" - enable power management and privileged factory reset; |
NewerOlder