Just some tips I gathered over time. All in one easily reachable place so I can share it wherever I want.
Some of it is just for me to copy and paste from :)
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
Hello! This is the Free Market team. We’re excited to introduce some design concepts you can find in our upcoming product, xDeposit. Below, we will be exploring demonstrations built with React, TypeScript and Framer Motion.
When evolving our approach to design, we try to find innovative ways to reduce the visual cognitive overload that appears to be under-addressed in the overwhelming majority of web design that we experience everyday.
One of the innovations which can reduce cognitive load is eliminating unnecessary use of modals. If you believe that modal windows are completely harmless, you might be wondering “what’s wrong with a simple modal, here and there?” It may be a surprise that there are many disadvantages to modals which may lead to sloppy UX. Modals could overload your users with too many cognitive changes.
If you are interested in UX, I highly recommend reading Therese Fessenden’s exciting write-up on modal dialogs, titled [Modal & Nonmodal Dialogs: Whe
You can inherit the environment variables from PID 1 by iterating over the list of null-terminated strings
in /proc/1/environ
, parsing the first characters up to the first =
as the variable name, setting the
remaining value as that variable, and exporting it.
The Code Snippet
This works with multiline environment variables, and environment variables with arbitrary values, like
strings, including =
or JSON blobs.
Paste this in your current terminal session to inherit the environment variables from PID 1:
The aim was to be able to:
- Run multiple Linux VMs on an Apple M1/ARM device
- Use Apple's HVF for native performance speeds
- Configure VMs to allow network access to each other
- Configure VMs to allow access to the internet
- Not rely on custom modifications of software
let | |
# Playdate distributes their SDK as precompiled x86_64 binaries | |
# currently so we have to import cross-compiled packages for it | |
# if we're not on an x86_64 system. | |
pkgsIntel = import <nixpkgs> { | |
crossSystem = { | |
config = "x86_64-unknown-linux-gnu"; | |
}; | |
}; | |
in |
export class Cache<T extends object, K> { | |
items = new WeakMap<T, K>() | |
get<P extends T>(item: P, cb: (item: P) => K) { | |
if (!this.items.has(item)) { | |
this.items.set(item, cb(item)) | |
} | |
return this.items.get(item)! | |
} |
{ pkgs ? import <nixpkgs> { } }: | |
let | |
demo-program = pkgs.writeShellScriptBin "helloWorld" "while sleep 3; do echo Hello World; done"; | |
demo-service = pkgs.substituteAll { | |
name = "demo.service"; | |
src = ./demo.service.in; | |
demoExe = "${demo-program}/bin/helloWorld"; | |
}; | |
demo-socket = pkgs.concatText "demo.socket" [ ./demo.socket ]; |
<?php | |
/* | |
A simple PHP class to perform basic operations against Amazon S3 and compatible | |
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
Copyright 2022 Marco Arment. Released under the MIT license: | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |