Skip to content

Instantly share code, notes, and snippets.

View edhowland's full-sized avatar

Ed Howland edhowland

  • Grand Rapids, Mi
View GitHub Profile
@edhowland
edhowland / mm.nu
Created November 26, 2023 19:46
The Game of MasterMind in Nushell
#!/usr/bin/env nu
# The game of MasterMind (https://en.wikipedia.org/wiki/Mastermind_(board_game)#Gameplay_and_rules)
# Save this file to something like 'mm.nu'.
# then run either 'nu mm.nu' or make it executable: 'chmod +x mm.nu; ./mm.nu'
# Use the --help option to see the list of options which includes --rules
# which details the game and game play and rules.
# init.nu: initialize guesses, games and running scores
@edhowland
edhowland / pbs-git-index.md
Last active July 7, 2023 00:31
Index of git miniseries within Programming By Stealth

Index of Git miniseries within Programming By Stealth series

Introduction

In Sept of 2020 Bart B https://bartificer.net/ and AllisonShttps://www.podfeet.com/blog/ of the most excellent podcast 'ChitChat across the Pond' https://www.podfeet.com/blog/category/ccatp/ started a series within a series of the Programming By Stealth on the Git version control system. This document lists the individual episodes show notes of just the Git miniseries by show number. The series ranges between PBS 102 through PBS 120.

At the top of every show notes page is a Play button where you can listen along

@edhowland
edhowland / ruby_reline_leaves_voice_over_and_terminal_in_bad_state.md
Last active March 10, 2023 21:11
Ruby Reline module leaves Terminal in bad state after the last thing was a print without a newline affecting MacOS VoiceOver screenreader users

If using a screenreader like VoiceOver for the Mac and you use Reline.readmultiline , for example in a loop , say in a REPL, and you output a string without terminating the line with a newline, funny things happen to your screenreader. Like, it no longer outputs the characters you type.

This can be easily demonstrated using Docker and 2 images: ruby:2.6 and ruby:3.2 In ruby:2.6 and before, the same program 'irb', Ruby's own REPL does not experience this problem. But in Ruby 2.7 and above, irb was changed to use the new Reline module instead of the venerable Readline, a wrapper around the venerable GNU readline library.

@edhowland
edhowland / error_registration
Created August 7, 2011 00:14
Registration Error GRDEvDay
Hi, I get this error:
A critical error has occurred.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Here is my post data/URL
http://grdevday.org/Default.aspx?tabid=62&error=Invalid+postback+or+callback+argument.++Event+validation+is+enabled+using+%3Cpages+enableEventValidation%3d%22true%22%2f%3E+in+configuration+or+%3C%25%40+Page+EnableEventValidation%3d%22true%22+%25%3E+in+a+page.++For+security+purposes%2c+this+feature+verifies+that+arguments+to+postback+or+callback+events+originate+from+the+server+control+that+originally+rendered+them.++If+the+data+is+valid
We couldn’t find that file to show.