May 4, 2021Best Cloudflare redirect setupEnable “Always Use HTTPS” Add a www CNAME to house your site as DNS-only Add an A record for xyz.com that points to 192.0.2.1 as proxied Under “Rules” create a new rule for xyz.com/* set it as a 301 forwarding URL to https://www.xyz.com/$1.1 min read1 min read
Sep 5, 2019Which array find is fastest?Array find vs. Array some vs. For of Fastest: Array find at 490ms Nearly same: Array some at 494ms 0.5x slower: Array for of at 745msJavaScript1 min readJavaScript1 min read
May 19, 2018Which array copy is fastest?Array spread vs. Array from vs. Array slice Fastest: Array spread at 188ms 1.9x slower: Array from at 361ms 3.5x slower: Array slice at 668msJavaScript1 min readJavaScript1 min read
Nov 28, 2017Which Boolean filtering is fastest?find vs. filter Fastest: Find concat at 335ms 7.7x slower: Filter at 2570msPerformance1 min readPerformance1 min read
Oct 23, 2017The one-step pull request 🚢✨Here’s a great helper that I use frequently https://github.com/kirkstrobeck/helpers/blob/master/pull-request The git workflow can then be simplified to pull create a branch, do some work, commit and pull-request To use, link the above script in your .bashrc or .zshrc and install Hub.Git1 min readGit1 min read
Sep 21, 2017Which object merge is fastest?Object spread vs. Object assign Fastest: Object assign at 201ms 5.2x slower: Object spread at 1040msJavaScript1 min readJavaScript1 min read
Sep 15, 2017Which string glue is fastest?Template literal vs. String concat vs. Array join Fastest: String concat at 10ms 1.8x slower: String literal at 18ms 147x slower: Array join at 1470msJavaScript1 min readJavaScript1 min read
Jan 4, 2016PusherVertical scaling, there’s gotta be a better way! Introducing Pusher. I’ve been using it for years; It is part of my core frontend toolset. TLDR; Easily implement native vertical responsive scaling by creating on-the-fly GIFs via base64 Demo, documentation, code, etc is all at kirkstrobeck/pusher; Here is a not-going-to-be-updated copy…Front End Development1 min readFront End Development1 min read
Dec 25, 2015AWS Lambda Node ModulesUpdate: Found the official, yet incomplete list So, after looking everywhere, turns out there is no listing of node_modules available to Lambdas; After doing some dir listing, here are the results: Also, here are other libs that may be interesting:Amazon Web Services1 min readAmazon Web Services1 min read
Oct 15, 2015Handlebars template assemblySometimes you need to assemble the templates before actually rendering the data. Both actions shouldn’t be broad sweeping, but specific. For example, sometimes the data presents an either/or render that the HTML needs in order to assemble the partials and code blocks properly. My use-case was email templating. I wanted to run the HTML thru Premailer prior to compiling with the data. The trick, undocumented Handlebars variable escaping.JavaScript1 min readJavaScript1 min read