Add Remark42 comments to Hugo website
Intro I’ve been looking to replace Disqus comments engine for my blog for a long time now. Additionally, I started working on another project where I would like to have people leave their opinions. So, it was a good motivation to finally do some research and get to action. To make it short, I won’t go into all the reasons why I was looking into alternatives to Disqus. But it’s about respecting my visitors’ privacy and having more control over my own platform (my blog).
Fixing `www` issue for Cloudflare Pages website
Prerequisites: Your website is hosted on Cloudflare Pages. Your website is not accessible when there is www in front of your apex domain. You kind of know what you’re doing. Recently, I was talking to people and at some point, I mentioned having my website. What stumbled me was that first, some people are still using www when typing the name of the website. And second, it turns out my website didn’t work with www in front of it.
GraphQL schema: use it in a sentence
TL;DR Bad idea query getCompanyInfo($id: Int!) { company(id: $id) { companyId companyName companyConditionValue companyConditionComment } } Good idea query getCompanyInfo($id: Int!) { company(id: $id) { id name specialWarning { triggered reason } } } There are a few very simple rules to follow to create an easy to read GraphQL schema. Easy reading schema helps you to reduce the number of visits to your documentation. Especially it helps if your GraphQL schema is not accompanied by any documentation.
Using Anki to study programming
Why it works Anki is based on spaced repetition learning technique. I will try to explain it shortly. When you learn something new you have to repeat it to remember it. If you repeat that information too often - you just waste your time. But if you don’t repeat it at the right time - you forget it. So the problem here is to figure out the right interval for repetitions.
Getting started with Jekyll
Install ruby Here I assume that you have brew already installed on your Mac machine. Install it first if you don’t have it. I had to do the following sudo xcode-select --install Install rbenv with brew install rbenv Add eval "$(rbenv init -)" to the end of ~/.zshrc or ~/.bash_profile Install a ruby version rbenv install 2.4.1 Select a ruby version by rbenv rbenv global 2.4.1 Open a new terminal window Verify that the right gem folder is being used with gem env home (should report something in your user folder not system wide) If you are on Windows then just install Ruby 2.
Host your personal blog on GitHub Pages
The initial idea was to write a small post about how to create a Jekyll blog hosted on GitHub. However, when I started to dig dipper and had realized how many things I’ll have to describe to make it a manual I’ve decided to make this index page which will collect all the posts about this topic. I will try to keep it up to date and make changes whenever I figure out more.
How to host Angular application on GitHub Pages
[Last update 04-04-2017] To install the command run the following: npm i -g angular-cli-ghpages Note: you have to create the dist folder in before (e.g. ng build --prod) ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/" ngh In case you use a custom domain for one of your repositories (like I do for this blog), you should use http instead ng build --prod --base-href "http://YOURDOMAIN.com/REPOSITORY/" ngh For more information check angular-cli-ghpages GitHub Page.