This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query: {insert query in script here} | |
Hi chatGPT. This prompt is part of a script used to manage a nixOS system. The query above is what the user asked from you. If the query is an action that can be done via the command line, such as updating the system, just return the command(s) to run in a shell, and no extra comments. Else, write `echo {answer}`, without the '`' and replacing {answer} with a short answer, of maximum one sentence, to what the user asked. The command for updating the system is `sudo nixos-rebuild switch`, without the '`'. The command for installing a package is `nix-env -iA {package name}`, without the '`' and replacing {package name} with the name of the package(s). If the query is `--help`, you will introduce yourself like you would answer a normal question (`echo {answer}`). It is very important to precisely follow these guidelines, otherwise the script will not work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = """ | |
[ ](bg:#4ab0bb)\ | |
[ ](bg:#5bc0cc)\ | |
[ ](bg:#6cd0dd)\ | |
[ ](bg:#7de0ee)\ | |
[ ](bg:#8ef0ff fg:#090c0c)\ | |
[](bg:#1692a4 fg:#8ef0ff)\ | |
$directory\ | |
[](fg:#1692a4 bg:#006d7d)\ | |
$git_branch\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max_width = 100 | |
hard_tabs = false | |
tab_spaces = 4 | |
newline_style = "Auto" | |
indent_style = "Block" | |
use_small_heuristics = "Default" | |
fn_call_width = 60 | |
attr_fn_like_width = 70 | |
struct_lit_width = 18 | |
struct_variant_width = 35 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# asus-hotkey-run - a script to run events on hotkey presses from ASUS laptops | |
# This is configured for the 2019 Zenbook Pro Duo, you should change this for your own laptop. | |
# (by hotkeys I mean those next to the power button, not fn+Fx) | |
# Huge thanks to OpenAI's ChatGPT, for writing most of this code :) | |
# The conversation that helped me write this script: https://chat.openai.com/share/c4a1915f-a90e-4357-b173-9be733ba3b10 | |
set -eu # We can't set `-o pipefail` because the evtest command that gets the device always fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
rust-overlay.url = "github:oxalica/rust-overlay"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, rust-overlay }: | |
flake-utils.lib.eachDefaultSystem | |
(system: | |
let |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@nix { "action": "setPhase", "phase": "unpackPhase" } | |
Running phase: unpackPhase | |
unpacking source archive /nix/store/a4yjk1w3jr2k8akmh4z5j88491abb992-source | |
source root is source | |
@nix { "action": "setPhase", "phase": "patchPhase" } | |
Running phase: patchPhase | |
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } | |
Running phase: updateAutotoolsGnuConfigScriptsPhase | |
@nix { "action": "setPhase", "phase": "configurePhase" } | |
Running phase: configurePhase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import Pin, I2C, RTC | |
import time | |
import ssd1306 | |
from random import randint | |
import ntp | |
# Don't forget to change these values! | |
# I recommend connecting the sda and scl to hardware-controlled I2C pins on your pico. | |
# You can look up the pinout and see which pins are controlled by which controller | |
# In my case, pins 0 and 1 (confusingly labeled 1 and 2 on the pi), the two on the top left, |