Skip to content

Instantly share code, notes, and snippets.

Cole Mickens colemickens

Block or report user

Report or block colemickens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c9b0ba1eae33b8c19878671a0b2ee271
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 Jun 1, 2020
amiibo-emulation-with-linux-vm.md
View 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

View grim.sh
#!/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)"
View gist:e0f7be3c350a583bb9c69b6caa9b73f2
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 .
View fetch-or-build-chromium-ozone.sh
#!/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
View status-time.sh
#!/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
View sway.dmesg.log
[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
View sway.log
2019-06-04 18:29:10 - [backend/drm/util.c:202] Unable to add DRM framebuffer: Invalid argument
2019-06-04 18:29:10 - [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (modeset): Invalid argument
2019-06-04 18:29:10 - [backend/drm/util.c:202] Unable to add DRM framebuffer: Invalid argument
2019-06-04 18:29:10 - [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (modeset): Invalid argument
2019-06-04 18:29:10 - [backend/drm/util.c:202] Unable to add DRM framebuffer: Invalid argument
2019-06-04 18:29:10 - [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (pageflip): Invalid argument
2019-06-04 18:29:10 - [backend/drm/util.c:202] Unable to add DRM framebuffer: Invalid argument
2019-06-04 18:29:10 - [backend/drm/atomic.c:55] eDP-1: Atomic commit failed (modeset): Invalid argument
2019-06-04 18:29:10 - [swaybar/tray/icon.c:314] Warning: no icon themes loaded
2019-06-04 18:29:10 - [backend/drm/util.c:202] Unable to add DRM framebuffer: Invalid argument
View gist:73c8ced344698f68058727a69efe9db7
these derivations will be built:
/nix/store/smhvbmcwck86nrkj01dx00fj4gai1428-chromium-unwrapped-76.0.3788.1.drv
/nix/store/q826f06gw2g91mrhnrkz4jni7lv5cf47-chromium-dev-76.0.3788.1.drv
building '/nix/store/smhvbmcwck86nrkj01dx00fj4gai1428-chromium-unwrapped-76.0.3788.1.drv'...
unpacking sources
unpacking source archive /nix/store/rj886sh4lm75n14aip580k8la9lys2l2-chromium-76.0.3788.1.tar.xz
source root is chromium-76.0.3788.1
setting SOURCE_DATE_EPOCH to timestamp 1557379643 of file chromium-76.0.3788.1/skia/ext/skia_commit_hash.h
patching sources
applying patch /nix/store/66yl73z7jgh3yda3zbf2hkfx0fyz7sr0-nix_plugin_paths_68.patch
You can’t perform that action at this time.