Loading Local Web Fonts With React Boilerplate

Create a file with the @font-face { ... } css font loader and to load it in the app you can use import '!!style-loader!css-loader!./path/to/fonts.css'; inside the app.js file

Sequelize Default Value For TIMESTAMPS

Sequelize (v4.38.0) is one of the famous ORMs for node.js.  I'm currently using it in the app that i'm building. One issue I am facing is setting a default value for the timestamps in PostgreSQL (10.4).  I'm sharing a sample migration for my reference and might also help developers find this post: https://gist.github.com/allaniftrue/9bb312a568eed5aff94b8cf9ad9d679c

PFSense – ACME Package – LetsEncrypt – Captive Portal – Certificate Auth

Lately I've developing a customized captive portal for a BYOD business.  At start I used an internal certificate authority and installed it on every server on the network just to show that green padlock    .  It wasn't really a big deal if other users of the network will see the certificate error because they'd really … Continue reading PFSense – ACME Package – LetsEncrypt – Captive Portal – Certificate Auth

Mikrotik 951G-2HnD Restore Configuration Script

image from mikrotik.com I Recently changed my router from TP Link's Archer C2 and now Mikrotik's 951G-2HnD after running weeks of unpatched system.  TP Link or most of the consumer WiFi routers are left vulnerable from KRACK and yet people are constantly accessing their bank accounts or confidential work materials or servers.  A sample successful attack can … Continue reading Mikrotik 951G-2HnD Restore Configuration Script

Automate MySQL Backup & Send To Email As Attachment On FreeBSD 11

Sharing a very simple script to dump a database, archive it and send it to an email. https://gist.github.com/allaniftrue/0ad52f931f317872b6a070425ea061bd Note:  The part that troubled me a most is the sending of email where sendmail / mail / mailx (I'm about to install mutt) doesn't allow *.tgz attachment even with the uuencode <file>.tgz command.  I don't know … Continue reading Automate MySQL Backup & Send To Email As Attachment On FreeBSD 11

Git filename

Stumbled upon a git issue where the images with uppercase can not be committed after changing the filenames to all lowercase. To solve it you just move it to the same folder with the new letter capitalization. git mv FileName.jpg filename.jpg