This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.
Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.
If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:
$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent www.website.org/tutorials/html/
This command downloads the website www.website.org/tutorials/html/.
The options are:
--recursive: download the entire website--domains website.org: don't follow links outside website.org| class EmbedMap extends HTMLElement { | |
| constructor () { | |
| super(); | |
| } | |
| loadScript(src, callback) { | |
| let script = document.createElement('script'); | |
| script.src = src; | |
| script.addEventListener('load', callback); | |
| document.querySelector('head').appendChild(script); | |
| } |
For Out of the Software Crisis.
These are under the MIT License. Do what you want, essentially. Probably doesn't work out of the box. Uses Pandoc, zx, weasyprint, and Literata.
You'll need to download them for this to work. And you'll need to edit the build script to point at the correct CSS files. And you'l need to edit the CSS to point at the correct font files.
This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| // Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
| // http://creativecommons.org/publicdomain/zero/1.0/ | |
| (function (win,doc) { | |
| 'use strict'; | |
| if (!win.FileReader || !win.addEventListener || !doc.querySelectorAll) { | |
| // doesn't cut the mustard. | |
| return; | |
| } | |
| doc.querySelectorAll('input[type="file"][accept="image/*"]').forEach( function (fileInput) { |
| /* Ultra lightweight Github REST Client */ | |
| // original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const token = 'github-token-here' | |
| const githubClient = generateAPI('https://api.github.com', { | |
| headers: { | |
| 'User-Agent': 'xyz', | |
| 'Authorization': `bearer ${token}` | |
| } | |
| }) |