This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day5_input: |- | |
seeds: 79 14 55 13 | |
seed-to-soil map: | |
50 98 2 | |
52 50 48 |
This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day7_input: |- | |
32T3K 765 | |
T55J5 684 | |
KK677 28 | |
KTJJT 220 | |
QQQJA 483 |
This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day6_input: |- | |
Time: 7 15 30 | |
Distance: 9 40 200 | |
when: day6_input is not defined | |
# Just split the input into a list of lists and remove unnecessary whitespace |
This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day4_input: |- | |
Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53 | |
Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19 | |
Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1 | |
Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83 | |
Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36 |
This file contains 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
--- | |
# WARNING: THIS TAKES A LONG TIME TO RUN ON REAL INPUT (6 hours!) | |
# This entire shitfuckery is exponential as all hell, Ansible was not made to do 190k tasks! | |
# Could be optimised I think by doing more logic within the Jinja2 loops, which would be calculated in the main Ansible process | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day3_input: |- | |
467..114.. |
This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day2_input: |- | |
Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green | |
Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue | |
Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red | |
Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red | |
Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green |
This file contains 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
--- | |
# Set the input | |
- name: Set example input | |
ansible.builtin.set_fact: | |
day1_input: |- | |
1abc2 | |
pqr3stu8vwx | |
a1b2c3d4e5f | |
treb7uchet | |
when: day1_input is not defined |
This file contains 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
--- | |
### | |
# This play builds a VyOS qcow2 image | |
### | |
- name: Set up vyos-vm-images repo | |
hosts: localhost | |
tags: vyos, prepare-build, build | |
gather_facts: false | |
tasks: | |
- name: Clone vyos-vm-images repo |
This file contains 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
# Replace 192.168.1.1 with your Moonraker IP | |
# I suffix "_ender3" in these, feel free to replace that too | |
sensor: | |
- platform: rest | |
name: klipper_ender3 | |
resource: "http://192.168.1.1:7125/printer/objects/query?heater_bed&extruder&print_stats&toolhead&display_status&virtual_sdcard&gcode_move&webhooks&temperature_sensor mcu_temp&temperature_sensor pi_temp&filament_switch_sensor Filament" | |
json_attributes_path: "$.result.status" | |
json_attributes: | |
- heater_bed |
This file contains 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
# This file contains pin mappings for the stock 2020 Creality Ender 3 | |
# V2. To use this config, during "make menuconfig" select the | |
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9) | |
# communication. | |
# If you prefer a direct serial connection, in "make menuconfig" | |
# select "Enable extra low-level configuration options" and select | |
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC | |
# cable used for the LCD module as follows: | |
# 3: Tx, 4: Rx, 9: GND, 10: VCC |
NewerOlder