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
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 |
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
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 = """..##....... |
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
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 |
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
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 |
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
# 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)] |
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
<?php | |
Kirby::plugin('mark/tag', [ | |
'tags' => [ | |
'mark' => [ | |
'html' => function($tag) { | |
return '<mark>' . $tag->value . '</mark>'; | |
} | |
] | |
] |
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
# PowerShell script to keep a Windows PC awake | |
Write-Host "Keeping PC awake... (send Ctrl+C to quit)" | |
while (1) { | |
$wsh = New-Object -ComObject WScript.Shell | |
$wsh.SendKeys('+{F15}') | |
Start-Sleep -seconds 59 | |
} |
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
using System.Text; | |
namespace MyFunction | |
{ | |
public static class MyFunction | |
{ | |
public static async Task<IActionResult> ItsMyFunction () | |
{ | |
// this is needed so that an encoding error is avoided when merging the 2 ca pdfs with PDFSharp | |
// https://gunnarpeipman.com/net/no-data-is-available-for-encoding/ |
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
<style type="text/css" media="screen,print"> | |
/* Page Breaks */ | |
/***Always insert a page break before the element***/ | |
.pb_before { | |
page-break-before: always !important; | |
} | |
/***Always insert a page break after the element***/ | |
.pb_after { |
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
<!doctype html> | |
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<meta charset='utf-8' /> | |
<script> | |
function subst() { | |
// get query vars | |
var vars = {}; |