'\nfunction Header(el)\n if el.level == 1 then\n -- return both the page break and the header as a list\n return { pandoc.RawBlock('openxml', pagebreak), el }\n end\n -- No `return el` needed, as not returning any value is the same as\n -- returning the original value.\nend\n```\n\nThis filter is performing two tasks:\n\n- Convert the markdown `div` to tex environment. As I am using this [bible-study-handout](https://github.com/JElchison/bible-study-handout) to compile my tex files, I need to place the notes to corresponding environment.\n\t- For `marginnote`, it will change to `studycomment` environment.\n\t- For `inline`, it will change to `studycommentinline` environment. \n- Convert all `Superscripts` to `\\V{verse number}` as in the handout, verse will be having its own style.\n\nBy placing this Lua filter to the same directory as the source document, perform the conversion to tex by using the following command:\n\n```\npandoc --from markdown --to latex --wrap=none --lua-filter divintex.lua sample.md -o output.md\n```\n\nIt will not wrap the text, so that it won't do any unnecessary splittings.","I":"Tutorial","J":".k/)!Ua%=","H":"md","G":1690826899042},{"C":"nn?Kf*K45","A":"How to implement AdGuard on QNAP Container Station","D":"how_to_implement_adguard_on_qnap_container_station","E":1689933230098,"F":"> *AdGuard is a very powerful ad-blocking tool, it provides a network-wide ads & trackers blocking DNS server. In this tutorial, I will demonstrate how to setup AdGuard Home on QNAP Container station.*\n\nAs usual, you need to get **Container Station** installed on your QNAP. Then perform the following steps:\n\n- In **Container Station**, in the left panel, click **Create** and search `adguardhome`, create the container and ensure you are using the latest version.\n- In the creation panel, give the container a proper name, or leave it as default.\n- For the other settings, remain default. Navigate to **Advanced Settings**.\n- Under **Network**, specify the **hostname** to be `adguard` for easy searching.\n- In **Network Mode**, choose `bridge`. *This step is important.*\n- It is strongly advised to manually determine the **IP address**, so that when we configure the DNS server in our router, it won't be pointing nowhere. In my case, I set it as `192.168.1.101`.\n- Click **Create** to initialize the docker, it shall take a minute or so. When it is running properly, go to `192.168.1.101` in your browser to configure the AdGuard home.\n\nFor the remaining configuration, it is quite straight forward. Choose the blocklist to tweak your need. You can see [[this post|install_adguard_home_on_a_mikrotik_router]] for more details.\n","H":"md","G":1690826907103,"I":"Tutorial","J":".k/)!Ua%="},{"C":"ESNNrh~_5","A":"Use Telegram to receive QNAP SMS notifications","D":"use_telegram_to_receive_qnap_sms_notifications","E":1690826926411,"F":"> *QNAP has a Notification Center, you can receive some alerts and notification through emails, SMS, Instant Messaging and dedicated push apps. But for Instant Mesagging tools, it only includes Skype. But with simple configuration, you can receive the alerts through Telegram.*\n\nSometimes you would like to receive some alerts and notifications from your QNAP, for instance some emerency firmware updates, errors. Receving email notifications is handy, but sometimes you don't want to receive a full email just for a single alert. As these alerts are meant to inform, rather than to store for a long time.\n\nYou can configure your Telegram to create a Bot that can be used to receive these alerts. Follow the steps below:\n\n- In ***Telegram***, search **BotFather** and type in `/new` to create a new bot. Follow its instruction and get a token for this bot.\n- The format of the *token* should looks something like this: `6123456789:AAAAA-tt-_T3_OOOOOOOOOOOOOOO`. Protect your token, for anyone who has the access can control this bot.\n- Get your Telegram user id. To get it, search **userinfobot** (or other bots with the same function), type in `/start`, it would return something like this:\n```\n@yourusername\nId: 1234567890\nFirst: [Your first name]\nLast: [Your last name]\nLang: en-US\n```\n- The `1234567890` is your *user id*.\n- In the following link, replace `[token]` and `[userid]` with the *token* and *user id* you just get:\n\n```\nhttps://api.telegram.org/bot[token]/sendMessage?chat_id=[userid]&text=@@Text@@&user=@@UserName@@&password=@@Password@@&to=@@PhoneNumber@@\n```\n\nSo it should look something like this:\n\n```\nhttps://api.telegram.org/bot6123456789:AAAAA-tt-_T3_OOOOOOOOOOOOOOO/sendMessage?chat_id=1234567890&text=@@Text@@&user=@@UserName@@&password=@@Password@@&to=@@PhoneNumber@@\n```\n\n---\n\n- Now its time to move back to QNAP, in ***Notification Center***, under **Service Account and Device Pairing**, choose **SMS** and Click **Add SMSC Service**.\n- In the pop up panel, choose **SMS service provider** to be **custom**.\n- Give your desired **Alias**, it can be anything.\n- Paste the the above link to the **URL template text**. And click **Send a test message** (this is the paper flight icon on the right.)\n- It will ask you to input a phone number, type in your Telegram phone number.\n- Your Telegram should receive a notification. If you can receive that, that means the service is setup. You can configure what types of alerts you would like to receive.\n\nBy using this tool, your Telegram is more than a simple instant messaging tool to communicate with other human beings, it becomes an All-in-One messaging tool. By reducing the amount of apps installed in your phone, it is always better - to save power / storage.","I":"Tutorial","J":".k/)!Ua%=","H":"md","G":1690827237229},{"C":"#>q#>\\R{g","A":"Memos - A self-hosted personal twitter / diary / note tool with connection with Telegram","D":"memos_-_a_self-hosted_personal_twitter_-_diary_-_note_tool_with_connection_with_telegram","E":1690826980711,"F":"> *I was struggling in finding a good tool to write my diary. I have been using Tiddlywiki for a few years, but [Memos](https://usememos.com/) has broaden my horizons and it is worth the trial.*\n\nMemos is an open source note-taking service inspird by [flomo](https://flomoapp.com/). It's implementation is quite straight forward, though it's documentation is very limited, but by following it's documentation. I can implement this tool happily on my QNAP NAS.\n\nThe best thing about Memos is it is very twitter like (now called X liked, what a name), you can quickly jot down the thoughts, notes, take a picuture of nearby stuff and post it for your own record. It would be significantly faster than writing an ordinary diary.\n\nThink of something - Write it down - That's it.\n\nIf you are using a docker, you can follow [its documentation here](https://usememos.com/docs/install/docker). It could run properly. But since I using a Cloudflared tunnel, I will need to configure it's IP address and network configurations. You may refer to the tutorials here. It applies the same settings.\n\nMemo also provides [third party apps](https://memos.moe/), so that you can access your Memos by using an Android or iOS device.\n\nBut since this service would be exposed to the internet, it could induce some security threats. To protect it against unautorized access, you can activate a Cloudflare application to protect it.\n\nBy using Cloudflare protection service, you will need to verify your identity before accessing the Memos service. It would cut the connection with your mobile apps. But what make it amazing is that you can use a tailor-made [Telegram bot](https://usememos.com/docs/integration/telegram-bot) to maintain the connection.\n\nIn this case, **you can just type to your Telegram bot to upload any notes come across your mind!** It is one of the most accessible tool you can imagine in jotting down what you think.\n\n","I":"Tutorial","J":".k/)!Ua%=","H":"md","G":1690827006541}],"L":{},"M":false,"N":true,"O":"<script src=\"/js/feather-search.js\"></script>\n<script src=\"/js/transclusion.js\"></script>\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"manifest\" href=\"/site.webmanifest\">","P":"%/kXbuZt|","_":{"A":"name","B":"desc","C":"id","D":"slug","E":"cd","F":"content","G":"md","H":"editor","I":"tags","J":"parent","K":"pages","L":"img","M":"static","N":"published","O":"head","P":"home"}}