Skip to content

Instantly share code, notes, and snippets.

@Keith-S-Thompson
Keith-S-Thompson / README.md
Last active August 29, 2015 14:06
g++ bug demo
@Keith-S-Thompson
Keith-S-Thompson / README.md
Last active August 29, 2015 14:07
gcc/clang pointer equality bug demo

I believe I've found a bug in the implementation of the "==" operator for pointers in both gcc and clang.

pointer_equality_bug.c is a demonstration of the bug.

Quoting N1570 6.5.9p6:

Two pointers compare equal if and only if both are null pointers,

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.

@Keith-S-Thompson
Keith-S-Thompson / README.md
Last active November 9, 2015 22:50
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
@Keith-S-Thompson
Keith-S-Thompson / README.md
Last active August 27, 2016 21:35
"Array ints not returning correctly"
@Keith-S-Thompson
Keith-S-Thompson / README.md
Last active September 21, 2016 22:54
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 \ } \ }.

Reference: http://stackoverflow.com/q/39627452/827263

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

The %n format for printf does not work.

Files:

  • 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
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>
      </div>