Other articles

  1. Converting files from meta-Markdown to Yamldown

    Replace the first line of the file with ---:

    ls *md | xargs -n 1 sed -i '1s/^/---\n/'

    Replace the first blank line with ---:

    ls *md | xargs -n 1 sed -i '0,/^$/{s/^$/---\n/}'

    (In the range between 0 and the first blank line (inclusive) replace blank lines with ---)

    Convert header …

    read more
  2. Suppressing warnings in CUDA

    Consider the following program:

    #include <cmath>
    __host__ constexpr double foo(double x){
      return std::sin(x);
    __host__ __device__ double boo(double x, double y){
      return foo(x)+y;
    __global__ void kern(){
    int main(){
      return 0;

    Compiling this with CUDA 10.1

    nvcc test.cu …
    read more