Skip to content

Instantly share code, notes, and snippets.

View deanbot's full-sized avatar

Dean Verleger deanbot

View GitHub Profile
@deanbot
deanbot / index.php
Created June 17, 2020 02:29
KirbyText mark-tag (include in site/plugins/mark-tag)
<?php
Kirby::plugin('mark/tag', [
'tags' => [
'mark' => [
'html' => function($tag) {
return '<mark>' . $tag->value . '</mark>';
}
]
]
@deanbot
deanbot / Read-InputLine.ps1
Last active July 3, 2021 09:27
(PowerShell) Read-InputLine
# Like Read-Line but can be exited from via a configured key press
#
# Returns the entered string or $false if CancelKeyCode (default is Esc) pressed
# Input truncated in display to fit one line
function Read-InputLine {
param (
[Parameter(Mandatory = $false, Position = 0)]
[string]$Prompt = "",
[Parameter(Mandatory = $false, Position = 1)]
@deanbot
deanbot / aoc2020_1.dart
Last active December 2, 2020 16:27
Advent Of Code 2020 Day 1 in dart
void main() {
int i = 0;
final List<AdventSolution> solutions = [
AdventSolution1(inputAdvent1),
AdventSolution2(inputAdvent1)
];
solutions.forEach((s) => print("Advent ${++i} solution: ${s.solution}"));
}
// Full inputs at https://adventofcode.com/2020/day/1/input
@deanbot
deanbot / aoc2020_2.dart
Last active December 2, 2020 19:28
Advent Of Code 2020 Day 2 in dart
void main() {
int i = 0;
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/2/input
@deanbot
deanbot / aoc2020_3.dart
Last active December 3, 2020 22:46
Advent Of Code 2020 Day 3 in dart
void main() {
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/3/input
var inputAdvent3 = """..##.......
@deanbot
deanbot / aoc2020_4.dart
Created December 4, 2020 15:06
Advent Of Code 2020 Day 4 in dart
void main() {
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/4/input
var inputAdvent4 = """pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980
@deanbot
deanbot / aoc2020_5.dart
Last active December 7, 2020 14:49
Advent Of Code 2020 Day 5 in dart
void main() {
int i = 0;
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/5/input
@deanbot
deanbot / aoc2020_6.dart
Last active December 7, 2020 14:49
Advent Of Code 2020 Day 6 in dart
void main() {
int i = 0;
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/6/input
@deanbot
deanbot / aoc2020_7.dart
Last active December 8, 2020 15:43
Advent Of Code 2020 Day 7 in dart
void main() {
int i = 0;
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/7/input
@deanbot
deanbot / aoc2020_8.dart
Last active December 9, 2020 12:33
Advent Of Code 2020 Day 8 in dart
void main() {
final List<Object> solutions = [
SolutionA(),
SolutionB()
];
solutions.forEach((s) => print(s.toString()));
}
// Full inputs at https://adventofcode.com/2020/day/8/input
const inputsDay8 = """nop +0