udevadm -d test-builtin net_setup_link /sys/class/net/eth0udevadm test /sys/class/net/eth0| #!/bin/sh | |
| # This script follows the instructions found in https://github.com/dhruvvyas90/qemu-rpi-kernel | |
| QEMU=`which qemu-system-arm` | |
| BASE_DIR=. | |
| RPI_KERNEL=${BASE_DIR}/kernel-qemu-5.4.51-buster | |
| RPI_DTB=${BASE_DIR}/versatile-pb-buster.dtb | |
| IMAGE_BASE=2020-08-20-raspios-buster-armhf-lite | |
| IMAGE=${IMAGE_BASE}.img |
| # This shell defines a development environment for a c project. | |
| { | |
| pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/39e6bf76474ce742eb027a88c4da6331f0a1526f.tar.gz") {} | |
| }: | |
| # Override packages if necessary | |
| #let | |
| # newExample = pkgs.example.override { | |
| # option = example | |
| # }; |
| // grab the URLs | |
| var urls = $('.tile--img__img').map(function(idx, el) { return el.src}); | |
| // write the URls to file (one per line) | |
| var textToSave = urls.toArray().join('\n'); | |
| var hiddenElement = document.createElement('a'); | |
| hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave); | |
| hiddenElement.target = '_blank'; | |
| hiddenElement.download = 'urls.txt'; | |
| hiddenElement.click(); |
| ## Builder for NixOS configurations defined at the end of the file to be built into KVM VM's | |
| { system ? builtins.currentSystem }: | |
| let | |
| loadcfg = cfgfile: { config, pkgs, ...}: { | |
| imports = [ <nixos/modules/virtualisation/qemu-vm.nix> cfgfile ]; | |
| config = { | |
| networking.extraHosts = '' | |
| 176.32.0.254 template | |
| ''; |
| #!/usr/bin/env sh | |
| set -e | |
| APP_NAME="myapp" | |
| DEFINE_PREFIX="MYAPP" | |
| BINARY="${APP_NAME}_linux_x86_64" | |
| BASE_DIR="$PWD" | |
| PLATFORM_DIR="$(dirname "$0")" | |
| PLATFORM_NAME="$(basename "${PLATFORM_DIR}")" |
| echo 1 > /proc/sys/kernel/sysrq | |
| echo s > /proc/sysrq-trigger #sync | |
| echo u > /proc/sysrq-trigger #unmount + mount readonly | |
| echo b > /proc/sysrq-trigger #reboot |