Moving to nsclass.github.io

I am moving to https://nsclass.github.io

| Leave a comment

WASM – Creating an WASM with Rust and React

The following github project shows how to create an WASM application with Rust and React framework

https://github.com/nsclass/react-wasm-game-of-life

Posted in Programming, Rust | Leave a comment

FP – Functional Programming with JavaScript

https://mostly-adequate.gitbooks.io/mostly-adequate-guide/

Posted in Functional Programming, Programming | Leave a comment

Rust – how async/await works

https://os.phil-opp.com/async-await/

Posted in Programming, Rust | Leave a comment

Sublime – matching multiple lines with regex

Start with (?s)

(?s)\[sometag\](.*?)\[\/sometag\]
| Leave a comment

Java – Dropwizard http request accessing log customizing example

Dropwizard can allow to access the attributes in a request as shown in below example.
Full layout logback format details can be found from http://logback.qos.ch/manual/layouts.html

server:
  rootPath: /test/services/rest
  requestLog:
    appenders:
    - type: file
      currentLogFilename: ./logs/requests.log
      archivedLogFilenamePattern: ./logs/requests-%d.log
      archivedFileCount: 5
      timeZone: UTC
      logFormat: "%h %l %u [%t{dd/MMM/yyyy:HH:mm:ss Z,UTC}] %reqAttribute{attributeName} \"%r\" %s %b \"%i{Referer}\" \"%i{User-Agent}\" %D"

Posted in Java, Programming | Leave a comment

Linux – Top 10 Performance commands

1. uptime
2. dmesg | tail
3. vmstat 1
4. mpstat -P ALL 1
5. pipstat 1
6. iostat -xz 1
7. free -m
8. sar -n DEV 1
9. sar -n TCP, ETCP 1
10. top

Posted in Linux, Programming | Leave a comment