Skip to content

Instantly share code, notes, and snippets.

View Coledunsby's full-sized avatar

Cole Dunsby Coledunsby

View GitHub Profile
@Coledunsby
Coledunsby / swiftlint.sh
Created January 30, 2023 17:21
Convert SwiftLint's output into GitHub Actions Logging commands
#!/bin/bash
# modified from https://github.com/norio-nomura/action-swiftlint
# convert swiftlint's output into GitHub Actions Logging commands
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands
function convertToGitHubActionsLoggingCommands() {
sed -E 's/^(.*):([0-9]+):([0-9]+): (warning|error|[^:]+): (.*)/::\4 file=\1,line=\2,col=\3::\5/'
}
@Coledunsby
Coledunsby / .swiftlint.yml
Last active January 31, 2023 20:27
Sample SwiftLint Config
# https://realm.github.io/SwiftLint/rule-directory.html
# 0.50.3: Bundle of Towels
analyzer_rules:
- capture_variable
- explicit_self
- typesafe_array_init
- unused_declaration
- unused_import
@Coledunsby
Coledunsby / printer.cfg
Last active March 25, 2020 04:06
Ender 3 Klipper Config (SKR mini E3 V1.2)
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v1.2. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader". Also, select "Enable extra
# low-level configuration options" and configure "GPIO pins to set at
# micro-controller startup" to "!PC13".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
@Coledunsby
Coledunsby / printer.cfg
Last active November 14, 2019 23:36
Ender 3 Klipper Config (Melzi)
# This file contains common pin mappings for the 2018 Creality
# Ender 3. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# Note, a number of Melzi boards are shipped with a bootloader that
# requires the following command to flash the board:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# If the above command does not work and "make flash" does not work
# then one may need to flash a bootloader to the board - see the
# Klipper docs/Bootloaders.md file for more information.