I hereby claim:
- I am bk2204 on github.
- I am bk2204 (https://keybase.io/bk2204) on keybase.
- I have a public key whose fingerprint is 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
To claim this, I am signing this object:
| import urwid | |
| def setup_cells(): | |
| layout = [0, None, None, 1, 2, 3, None, 4, None, 5, 6, 7, 8, 9, 10, 11, 12, | |
| 13, 14, None, 15, 16, None, 17, None] | |
| cells = [] | |
| for item in layout: | |
| if item is None: | |
| pile = urwid.Pile([]) | |
| else: |
| def main | |
| something_that_might_explode_violently | |
| rescue YourError => error | |
| case | |
| when error.status == 404 | |
| search | |
| when error.on_fire | |
| FireDepartment.call(type: :emergency) | |
| when error.status_code == 500 | |
| shame caller(1) |
| *.html |
I hereby claim:
To claim this, I am signing this object:
A transcript of an editing session using ex.
If you’ve used Vim or vi, any time you type a command starting with “:”, you’re writing an ex command. ex is the command-line only editor, and vi was originally written to provide better editing on non-dumb terminals.
This is an exercise in what editing used to be like before the advent of vi.
| class MMSorter | |
| def initialize(preference) | |
| @preference = preference | |
| @reverse = preference.each_with_index.to_h | |
| end | |
| def pairs(candy) | |
| # Find the candies which aren't part of a pair and sort them in preference | |
| # order. | |
| leftovers = candy.select { |_c, cnt| cnt.odd? }.map { |p| p[0] } |
| #!/bin/sh -e | |
| # This shell script demonstrates how to use the local keyword to create | |
| # dynamically-scoped variables in various shells. Notably, this technique works | |
| # with AT&T ksh, as well as bash, dash, mksh, pdksh, zsh, busybox sh, and other | |
| # Debian Policy-compliant sh implementations. | |
| # Simple Perl-compatible testing framework. Produces TAP output. | |
| COUNT=0 | |
| is () { |
| alert(1); |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Crypt::Passwd::XS; | |
| use MIME::Base64; | |
| my $password = <STDIN>; | |
| chomp $password; |
| #!/bin/sh | |
| REV="${1:-HEAD}" | |
| git show --no-patch --format=tformat:"%b" -1 "$REV" | \ | |
| ruby -e 'puts $stdin.read.split("\n\n").map { |c| c.gsub("\n", " ") }.join("\n\n")' |