NextJS has a built-in support for environmental variables. This is how they do it import { loadEnvConfig } from ‘@next/env’;const { API_URL } = loadEnvConfig(‘./’, true).combinedEnv This is useful for when you need to manually access what’s in those .env.* files.
Category: Uncategorized
how long does it take to port ATT prepaid number to google voice
It takes exactly 24 hours. It’s so precise, it’s mostly likely a timed job that google runs at the exact 24 hours mark.
Canon MG7520 scanner bricked after Mac OS X Catalina upgrade
I have a Canon MG7520 printer scanner. After upgrading to Mac OS X Catalina, I can no longer find the scanner. Apparently Apple stopped supporting the driver so now my scanner is bricked. To use it, I had to download a Windows VM from the Microsoft website. I run my VM in Bridge Network mode,… Continue reading Canon MG7520 scanner bricked after Mac OS X Catalina upgrade
Travis Credit Union terrible UI design
I’ve clicked on the back button EVERY SINGLE time without fail. Whoever built and QA this is incompetent.
How to restore database in a mssql docker container using .bak
Start the container and attach the local folder to the docker container docker run -v /Users/mac/data:/sqldata -e ‘ACCEPT_EULA=Y’ -e ‘MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>’ -p 1433:1433 -d microsoft/mssql-server-linux:latest Run the restore database command sqlcmd -S localhost,1433 -U SA -P ‘<YourStrong!Passw0rd>’ -Q “USE [master] RESTORE DATABASE [mydatabase] FROM DISK = N’/sqldata/MyBackup.bak’ WITH FILE = 1, MOVE ‘MyBackup’ TO ‘/var/opt/mssql/data/MyBackup.mdf’, MOVE… Continue reading How to restore database in a mssql docker container using .bak
Godaddy managed wordpress upload http error
To fix this, log in using sFTP. Then go to /wp-content/uploads/ Then delete the folder for the month you wanted to upload. This is a 403 Forbidden error. I am guessing somewhere along the line, the permission of the folder gets screwed up so you can’t upload anything into the folder. Deleting it and allowing… Continue reading Godaddy managed wordpress upload http error
How to hang pictures straight on drywall
Of all the things my wife asks me to do around the house, the thing I hate most is hanging pictures. I am a perfectionist, so when I hang pictures, it has to be straight. I also hate putting more holes than I have to in the drywall. It used to take me over an… Continue reading How to hang pictures straight on drywall
How to use SheetJS XLSX with Angular 4 Typescript in the browser
It took me a while to figure this out, so I’ll share my code here. You will need the `file-saver` and `xlsx` npm packages. There are two important parts: 1. Make sure you specify the `meta` section in systemjs or else it won’t load `XLSX.utils` 2. Use the correct `XLSX.write` parameters, otherwise you will get… Continue reading How to use SheetJS XLSX with Angular 4 Typescript in the browser
heroku npm install not updating because of cache
Wasted a frustrating hour trying to figure out why `npm install` and `npm install foobar` would not update my package. Finally found this: https://devcenter.heroku.com/articles/nodejs-support#cache-behavior Their caching is very rigid. Even if `npm install` runs and it tells you the package is updated, it won’t update. The cache will just replace itself. Even deleting the entire… Continue reading heroku npm install not updating because of cache
How to run angular 4 karma tests on circleci
Here is what I had to add to my circle.yml machine: node: version: 6.10.1 test: override: – npm run-script test:once 1) Setting node version is important on CircleCI otherwise you’ll get a bunch of peer dependencies errors. 2) Karma is set up to run tests continuously, which is not good on CircleCI.