Sunday, 12 January 2020

20200113: Installing Notepad++ 7.6 plugins

From <https://stackoverflow.com/questions/40015350/how-to-install-a-notepad-plugin-offline>:

Here are the steps that worked for me:
  1. Download the plugin and extract the plugin dll file.
  2. Place the plugin.dll file under plugin folder of notepad++ installation. For me it was : C:\Program Files\Notepad++\plugins
    • For me, I had to create a separate subdirectory under the plugins directory and place the DLL in the separate subdirectory
  3. Go to Notepad++ then : Settings -> Import -> Import plugin (import the plugin).
  4. Notepad++ will show the restart message / Sometimes it may not show it.
  5. Restart the notepad++.
  6. Should see new plugin under the Plugins menu. ALL DONE!!

Monday, 6 January 2020

20200107 - for-each in Google Script

Refer to <https://stackoverflow.com/questions/46693496/for-each-loop-in-google-apps-script>:

In Google Apps Script:
When using "for (var item in itemArray)",
'item' will be the indices of itemArray throughout the loop (0, 1, 2, 3, ...).

When using "for each (var item in itemArray)",
'item' will be the values of itemArray throughout the loop ('item0', 
'item1', 'item2', 'item3', ...).

Wednesday, 1 January 2020

20200102: Rabbit Warren 01 - M'Cheyne and Make

Goal:
- Make r/o REST API of the M'Cheyne Bible Reading Plan
- Use https://my-json-server.typicode.com/
- Scrape raw data from https://bibleplan.org/plans/mcheyne/
- PS w3m -dump -cols 132 https://bibleplan.org/plans/mcheyne/  
- Pre-process data
- Document pre-processing procedure with Makefile
- Install make
- Learn make
- Download Alpine container
- Create Dockerfile for Alpine+make (from https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)
FROM alpine
RUN apk update
RUN apk add make
CMD /bin/sh
- upload to Docker Hub (from https://docs.docker.com/docker-hub/)
- PS C:\u\docker\alpine-make> docker build -t kkwoo/my-first-repo .
- PS C:\u\docker\alpine-make> docker run --rm -it kkwoo/my-first-repo
- PS C:\u\docker\alpine-make> docker login (from https://github.com/docker/hub-feedback/issues/1222)
- PS C:\u\docker\alpine-make> docker push  kkwoo/my-first-repo
- PS C:\u\docker\alpine-make> docker run -it --rm -v c:/u/docker/alpine-make:/mnt kkwoo/my-first-repo