Skip to content

Instantly share code, notes, and snippets.

Vo Minh Thu noteed

Block or report user

Report or block noteed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
noteed /
Last active Nov 11, 2019
A sense of speed

A sense of speed

Reading data from disk

Create a file system in RAM:

$ mkdir ramdir
$ mount -t tmpfs -o size=500m tmpfs ramdir
noteed /
Last active Nov 9, 2019
Pandoc, YAML, JSON, CSV, Sqlite

Pandoc, YAML, JSON, CSV, Sqlite

This gists shows a little idea: use Pandoc to format data into HTML, or any other output format supported by Pandoc. This uses the ability of Pandoc to uses templates, and to receive data as YAML either from a separate file, or within a metadata block contained in the document itself..

It also shows a few scripts to use other data formats than YAML and extract metadata blocks as JSON. Note that multiple metadata blocks can be present within a single document.

noteed / site.hs
Created Oct 21, 2018
Hakyll compiler for inline (embedded in site.hs) content
View site.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Binary (Binary (..))
import Data.Typeable (Typeable)
import Hakyll.Core.Compiler.Internal (compilerAsk, compilerProvider)
import Hakyll.Core.Provider (resourceFilePath)
import Hakyll
noteed / output.txt
Created Oct 21, 2018
Hakyll Compiler to create files from inline (embedded in site.hs) content
View output.txt
$ ./dist/build/site/site build
Creating store...
Creating provider...
Running rules...
Checking for out-of-date items
updated hello.txt
$ ls _site/
noteed /
Last active Mar 18, 2018
Haskell troubleshooting

Haskell troubleshooting

Notes about problems I had and what I did about them.


gusdev@d6a1d607e6fe:~$ cabal install newtype-generics-
Resolving dependencies...


  • Agda
  • BlueSpec
  • Carp
  • clash
  • cogent
  • Cryptol
  • dhall
  • Elm

Web app


The theme-color meta tag is used to specify a toolbar color on Android. The color is used both in Chrome and when the page is used as a web app added to the home screen (actually, there is also a theme-color attribute in the manifest).

To turn the page into a web app (instead of a Chrome tab), add a web app manifest file. See for some detail. Note that the service worker is not necessary for the web app look.

The service-worker is used to implement the off-line behavior of the app, but also web push notifications.

View default.nix
{ pkgs ? import <nixpkgs> { } }:
kernel_version = "4.4.52";
kernel-sha256 = "e8d2ddaece73e1a34e045bbdcdcc1383f658e24537797f8d8e0dd520cf1b1f06";
nix_version = "1.11.9";
nix-sha256 = "0e943e277f37843f9196b0293cc31d828613ad7a328ee77cd5be01935dc6e7e1";
in rec
linux-tarball = pkgs.fetchurl {
noteed /
Created Jan 17, 2017
Certificate notes

Certificate notes

  • View a certificate
openssl x509 -text -noout -in certificate.crt
You can’t perform that action at this time.