Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";Go to the course and have any video up. The following code relies on the right sidebar to be visible to uncheck all your progress.
You can do this with ctrl+shift+j and making sure the console tab is selected for chrome/brave
| /* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */ | |
| #define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand" | |
| #define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs" | |
| #define GET_HOSTNAME "sudo raspi-config nonint get_hostname" | |
| #define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s" | |
| #define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli" | |
| #define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin" | |
| #define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1" | |
| #define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2" | |
| #define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3" |
| # Useful references: | |
| # | |
| # https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
| # https://ss64.com/vb/sendkeys.html | |
| # https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
| # https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
| # | |
| # Future enhancements - use events rather than an infinite loop | |
| $wsh = New-Object -ComObject WScript.Shell | |
| while (1) { |
| git fetch --prune origin "+refs/tags/*:refs/tags/*" |
Lately I've been using Mikrotik routers because they're cheap, powerful, and fast. Most of them have either a USB or MicroSD slot, so you can add enough space to store network boot images right on the router.
I got most of the tips needed from these two articles, and combined them into this step by step guide:
| <span class="label" ng-class="{'possibleValue1' : 'class1', 'possibleValue2' : 'class2', 'possibleValue3' : 'class3'}[object.value]" ng-bind-html='object.value'></span> |
| <!doctype html> | |
| <!-- Adapted from https://gist.github.com/tfausak/2222823 --> | |
| <html> | |
| <head> | |
| <title>Mobile-ready web app</title> | |
| <!-- CONFIGURATION --> |
| /* | |
| * Steps | |
| * 1. Rename your gulpfile.js to gulpfile.babel.js | |
| * 2. Add babel to your package.json (npm install -D babel) | |
| * 3. Start writing ES6 in your gulpfile! | |
| */ | |
| import gulp from 'gulp'; // ES6 imports! | |
| import sass from 'gulp-sass'; | |