- Upgrade Next.js to
^12.1.0
- Upgrade
next-transpile-modules
to^9.0.0
- Install the NewRelic Next.js agent
"@newrelic/next": "0.1.0",
- Change the
dev
command tonext dev
- Change the
start
command toNODE_OPTIONS='-r @newrelic/next' next start
- Change the
build
command tonext build
only (dropping&& tsc --project tsconfig.server.json
) and deletetsconfig.server.json
file - Remove
nodemon
dependency and deletenodemon.json
file
Working with amplify has allowed me to develop some opinions about it. As with any opinions, these are absolutely correct :)
Amplify is an opinionated, category-based client framework for building scalable mobile and web apps. Think of it like a devops-as-code tool to manage all aspects of a traditional application's infrastructure. Under the hood Amplify generates CloudFormation templates which are used to then provision your applications resources. These templates are generated as a result of guided configuration wizards that the Amplify CLI provides for you.
const seedTransaction = async (tableMap, data) => { | |
// Each key in data contains its type in parenthesis | |
// We must remove them before we can properly map over them | |
const formattedData = data.map(d => { | |
const keys = Object.keys(d).map(k => k.substring(0, k.indexOf(' '))); | |
const values = Object.values(d); | |
return keys.reduce((acc, k, i) => { | |
acc[k] = values[i]; | |
return acc; | |
}, {}); |
/** | |
* jQuery 2.1.3's parseHTML (without scripts options). | |
* Unlike jQuery, this returns a DocumentFragment, which is more convenient to insert into DOM. | |
* MIT license. | |
* | |
* If you only support Edge 13+ then try this: | |
function parseHTML(html, context) { | |
var t = (context || document).createElement('template'); | |
t.innerHTML = html; | |
return t.content.cloneNode(true); |
#!/usr/bin/env sh | |
# Multiple vulnerabilities have been disclosed in RubyGems: | |
# https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ | |
# | |
# If you're an Rbenv user, here's any easy one-liner to upgrade to a | |
# safe version of Rubygems (2.7.6 or later) for each installed Ruby version: | |
for i in $( rbenv versions --bare ); do RBENV_VERSION=$i gem update --system && echo "\n$(ruby -v) using rubygems $(gem --version)\n"; done |
Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh
into the pre-action script box.
Recently, I had a staging database on Heroku that was running on the Ronin database (which was originally the lowest-sized DB you could get at Heroku). Since they added two new options, Crane and Kappa, we wanted to take advantage of the cost savings. Here's how you can migrate your Ronin DB to Crane (or any other plan).
The old database was named BROWN while the new one is CRIMSON. You can determine this by running:
heroku pg:info --app myapp-staging
-
Add Crane database
heroku addons:add heroku-postgresql:crane --app myapp-staging
heroku pg:wait --app myapp-staging
#!/bin/bash | |
# I made this script to convert SVG icons for an iOS app into PNG. | |
# The script will create icons in 3 sizes for different screen DPIs. | |
find . -type f -name "*.svg" | while read f | |
do | |
FILENAME="${f%.*}" | |
echo '---' | |
inkscape -W "$FILENAME.svg" |
http://www.blockbuster.com/franchise.html
Here's the full count per state:
AK: 13
FL: 1
IN: 6
KY: 3
LA: 1
MN: 1