Skip to content

Instantly share code, notes, and snippets.

Looking for a job in the San Diego area

Keith Thompson Keith-S-Thompson

Looking for a job in the San Diego area
View GitHub Profile
cat > test_script_name <<EOF
echo It worked
chmod +x test_script_name
View check-env
use strict;
use warnings;
my %saved_env = %ENV;
my $term = $ENV{TERM};
my $error_count = 0;
foreach my $var (sort keys %saved_env) {
return (
  <div className="App">
    <h1>Quantum Pilot</h1>
      <div className="content">
        <div className="box"><About/></div>
        <div className="box">HnnYoutube</div>
        <div className="box">{buy}</div>
        <div className="box">{mykeys}</div>
      <MetamaskPrompt enabled={this.state.metamask}/>

Demo program for a bug that appears under Termux on Android.

The %n format for printf does not work.


  • percent-n-test.c is the test program.
  • correct-output.txt is the correct output
  • incorrect-output.txt is the output under Termux on my Nexus 9, Android 7.1.1
Keith-S-Thompson /
Last active Sep 21, 2016
How to use {{ }} with Markdown

I would like to write {{ ... }} inside a code block using Markdown.

For example:

{{ var }}  

I don't know why it disappears. However I can write it outside a block of code: \ {\ { var \ } \ }.


Keith-S-Thompson /
Last active Aug 27, 2016
"Array ints not returning correctly"
Keith-S-Thompson /
Last active Nov 9, 2015
Demonstration of Ctrl-Z bug, bash 4.4-beta

This gist contains strace output for bash 4.4-beta on Debian 6.0.10. It demonstrates a problem with the handling of Ctrl-Z (SIGTSTP).

For some unknown reason, the behavior differs depending on whether I use xterm (where it works correctly) or rxvt (where it doesn't).

The commands I used are:

xterm -e strace -o xterm_bash.strace /usr/local/bin/bash --norc

This is a CVS demo script for this question posted by Paul Bunch on Stack Overflow.

The cvs annotate command prints a message on standard error of the form:

Annotations for hello.txt

The questioner is trying to redirect that message when invoking cvs annotate from a Perl script. I have so far been unable to reproduce the problem. I ask Paul Bunch to try running this script on his own system.