Skip to content

Instantly share code, notes, and snippets.

function nixbuild() {
t="$(mktemp -d)"
link="${t}/out"
nix build --out-link "${link}" "${@}"
tl="$(readlink -f ${link})";
rm -rf "${t}"
echo -e "${tl}"
}
0 plugins were checked, 593 plugin(s) could not be downloaded:
Traceback (most recent call last):
File "./update.py", line 384, in prefetch
plugin, redirect = prefetch_plugin(owner, repo, branch, alias, cache)
File "./update.py", line 238, in prefetch_plugin
commit, date = repo.latest_commit()
File "./update.py", line 64, in f_retry
return f(*args, **kwargs)
File "./update.py", line 115, in latest_commit
let
mozpkgs = builtins.fetchTarball { url = "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"; };
pkgs = import ../../nixpkgs/cmpkgs {
overlays = [
(import "${mozpkgs}/rust-overlay.nix")
(import "${mozpkgs}/rust-src-overlay.nix")
];
};
in
cole@raspberry ~/c/nixcfg (master) [1]> sudo nix copy --to 'local?root=/mnt/' /run/current-system/
error: cannot enqueue a work item while the thread pool is shutting down
cole@raspberry ~/c/nixcfg (master) [1]>
cole@raspberry ~/c/nixcfg (master) [1]> sudo nix copy --to 'local?root=/mnt/' /run/current-system/
error (ignored): cannot add path '/nix/store/08365mvsv7lsa3s38fmzgaggsydhpig9-etc-fstab' because it lacks a valid signature
error: cannot enqueue a work item while the thread pool is shutting down
cole@raspberry ~> NIX_STORE_DIR=/mnt/nix/store nix-store -q --graph
digraph G {
}
@colemickens
colemickens / amiibo-emulation-with-linux-vm.md
Last active March 23, 2024 03:37
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

Some users are discussing this guide in #hacking on the JoyConDroid Discord: https://discord.gg/SQNEx9v.

DO NOT ask for, or share links to, Amiibo bins in the comments! They will be removed. Thank you for understanding.

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

#!/usr/bin/env bash
set -x
set -euo pipefail
grim /tmp/output.png
imv -f /tmp/output.png &
p="$!"
g="$(slurp)"
kill "${p}"
offset="$(echo "${g}" | cut -d' ' -f1)"
these derivations will be built:
/nix/store/wd2ggygj4vfyyqscnax6kfbzfw3rmg7c-gopass-8c7b4a250052d401722b6cbf9308b23a3d3d5661.drv
building '/nix/store/wd2ggygj4vfyyqscnax6kfbzfw3rmg7c-gopass-8c7b4a250052d401722b6cbf9308b23a3d3d5661.drv'...
unpacking sources
unpacking source archive /nix/store/xa6knanrgpsb47ahw425gv8p0fw449vp-source
source root is source
patching sources
configuring
building
Building subPackage .
#!/usr/bin/env bash
ref="cmpkgs"
tree="https://github.com/colemickens/nixpkgs/commits/${ref}"
nixpkgs="https://github.com/colemickens/nixpkgs/archive/${ref}.tar.gz"
echo "you should check ${tree} for safety/sanity"
echo "you should also check that you trust the binary caches used in this script"
echo
echo -n "3..."; sleep 1
#!/usr/bin/env bash
set -euo pipefail
declare -A timezones=( ["SEA"]=":US/Pacific" ["TOP"]=":US/Central" ["HAM"]=":Europe/Berlin" )
result=""
for K in "${!timezones[@]}"; do
time="$(env TZ="${timezones["$K"]}" date '+%e %H:%H:%S')"
result="${result}${K}[${time} ] "
done
[18494.709746] [drm:drm_internal_framebuffer_create [drm]] could not create framebuffer
[18494.709754] [drm:drm_ioctl [drm]] pid=922, ret = -22
[18494.709781] [drm:drm_ioctl [drm]] pid=922, dev=0xe200, auth=1, DRM_IOCTL_MODE_DESTROYPROPBLOB
[18494.709794] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 106 (2)
[18494.709804] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 106 (1)
[18494.709813] [drm:drm_ioctl [drm]] pid=922, dev=0xe200, auth=1, DRM_IOCTL_MODE_CREATEPROPBLOB
[18494.709832] [drm:drm_ioctl [drm]] pid=922, dev=0xe200, auth=1, DRM_IOCTL_MODE_ATOMIC
[18494.709848] [drm:drm_atomic_state_init [drm]] Allocated atomic state 000000004dcb5fab
[18494.709861] [drm:drm_mode_object_get [drm]] OBJ ID: 107 (2)
[18494.709874] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:30:plane 1A] 00000000d604eaf0 state to 000000004dcb5fab