#bash #deployment #ci #toolingBash Cheatsheet: check if environment variables are set or file/symlinks exists + moreA bash scripting cheat sheet for developers who just want to get by. Writing setup, CI and deployment flows means a bit of the old bash scripting. Despite my deep interest in the intricacies of Bash (/sarcasm), I’ve kept hitting up Google and StackOverflow for solutions to ...
#javascript #nodeAsync JavaScript: history, patterns and gotchasA look at the history, patterns and gotchas of asynchronous operations in JavaScript. We’ll go through the pros and cons of callbacks, Promises and async/await. Present some pitfalls to bear in mind as well as introducing how you would deal with certain situations. Live-cod ...
#deployment #dokku #MongoDBConnect to MongoDB on Dokku with your local command line or Robo3TThe Dokku mongo plugin provides a mongo:connect command, which opens a tunnelled connection to you MongoDB instance on Dokku. This is how you can connect to your database using the tool of your choice, the examples will be using Robo3T. Table of Contents: ...
#Sequelize #Express #javascript #nodeSequelize Data Types: a practical guideDataTypes are core to the Sequelize 4 library. This is a practical and complete guide to make up for the sparse Sequelize official documentation on the subject. First of all, DataTypes contains both the types and generators for default values: eg. NOW, UUIDV1 and UUIDV4 are speci ...
#javascript #web developmentAvoid null/undefined in JavaScript arraysHow to avoid TypeError: Cannot read property ___ of undefined using Array.filter(Boolean) tl;dr: Array.filter(Boolean) filters out falsy values (null, undefined, 0, false, '') and avoids Cannot read property of undefined errors. Table of contents: ...
#javascript #tipJavaScript array type check - “is array” vs object in-depthDetecting Array vs Object in JavaScript with examples tl;dr To detect if something is an Array in JavaScript, use Array.isArray(somethingObjectToCheck). This post is a quarter useful, quarter history lesson, half quirky JavaScript exploration. Table of contents: ...
#meta #seo #technical writingTechnical content workflow for “Code with Hugo”: static site, Paper, Medium, DEV and Buttondowntl;dr: here are the tools used to power, build and publish codewithhugo.com: Dropbox Paper because it syncs desktop/mobile and outputs to markdown Unsplash for cover images Edited Markdown + images → Hugo static site generator Casper 2 (https://ghost.org default theme) for Hugo S ...
#javascript #vuejs #nodePost Frequency: from prototype to production with Vue + NodeIf you want to ship, use the tools you know. — A lot of people Let’s apply that principle: I’m building Post Frequency/Accountable Blogging, I’m familiar with Vue and Node-based backends. Netlify makes frontend deployments trivial and I’ve settled on Dokku for ...
#javascript #meta #paymentAdd a Vanilla JavaScript paywall to a Hugo site using checkoutpage.coHow I created the buying mechanism for the Sequelize ES6 Cheatsheet using checkoutpage.co and sprinkles of vanilla JavaScript. This strictly isn’t a paywall, it’s all client-side and doesn’t check much. In principle you can display the whole things using a bit of CSS ...
#node #javascript #meta #gitA simple JavaScript/Node coding setup on Mac OS XHere’s how I get productive for JavaScript/Node on Mac OS. It includes iTerm2, zsh, Node, Visual Studio Code and some git commands. ...