sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
const std = @import("std"); | |
const assert = std.debug.assert; | |
const Allocator = std.mem.Allocator; | |
const Io = std.Io; | |
pub fn main() !void { | |
var debug_allocator: std.heap.DebugAllocator(.{}) = .init; | |
const gpa = debug_allocator.allocator(); | |
//const gpa = std.heap.smp_allocator; |
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
This list was compiled from https://web.archive.org/web/20230911135706/https://docs.docker.com/desktop/release-notes/, retrieved on 2024-05-24 | |
It appears links for later updates than 4.22.1 are currently (as of early Aug 2024) being kept up to date on https://docs.docker.com/desktop/release-notes, I'm not going to continuously update this but others may in the comments below, so check that link or the comments if you need a later version than 4.22.1. | |
The information may not be correct in all cases, or may have changed since archive.org archived the page. At time of posting, I spot-checked a few links and they appeared to be good, but really, all I've done is copied, pasted, and visually formatted the information I found on archive.org, so no warrantee that it's good. | |
If the download links don't work, sometimes archive.org has the download archive, and you can try adding https://web.archive.org/web/20230911135706/ to the beginning of the URL. For instance, as of this writing, the 4.22.1 Windows download i |
Scenario: you have both OpenSSL 1.0 and 1.1 installed (using Brew) in your OSX system and you want to switch the current active version without removing other versions that already installed. Here is how to do it.
$ ls -al /usr/local/Cellar/openssl*
/usr/local/Cellar/openssl:
A simple way to detect a click outside of an element with vanilla JavaScript
A Pen by Marcelo Ribeiro on CodePen.
import 'package:flutter/material.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
//https://stackoverflow.com/a/53107519/10409567 | |
void main() async { | |
// load the shared preferences from disk before the app is started | |
WidgetsFlutterBinding.ensureInitialized(); | |
final prefs = await SharedPreferences.getInstance(); | |
// create new theme controller, which will get the currently selected from shared preferences |
var readline = require('readline'); | |
readline.emitKeypressEvents(process.stdin); | |
if (process.stdin.isTTY) | |
process.stdin.setRawMode(true); | |
process.stdin.on('keypress', (chunk, key) => { | |
if (key && key.name == 'q') | |
process.exit(); |