Skip to content

Instantly share code, notes, and snippets.

View brettjrea's full-sized avatar
:electron:
Live for Love! Love for Life!

Brett Rea brettjrea

:electron:
Live for Love! Love for Life!
  • Long Island, NY
View GitHub Profile
{ stdenv, autoPatchelfHook }:
stdenv.mkDerivation rec {
pname = "wasmcloud-binaries";
version = "1.0";
src = ./.; # Assuming the binaries are in the current directory
nativeBuildInputs = [ autoPatchelfHook ];
@brettjrea
brettjrea / NextJS_Conf_2023_Conclusions.md
Last active October 27, 2023 04:48
NextJS Conf 2023 Notes

Summary & Conclusions from the Next.js Conference 2023

The Next.js Conference of 2023 has undoubtedly been an enlightening and transformative event for the web development community. A myriad of talks, discussions, and releases provided insights into the evolving landscape of web development, particularly within the ecosystem of Next.js.

Key Takeaways:

  1. Next.js 14 Innovations: Guillermo Rauch’s keynote enlightened the audience about the Next.js 14 features, notably the app router, server actions, and partial pre-rendering. The highlight was the introduction of the app router which aims to revolutionize the way dynamic websites are built using React server components and data fetching.

  2. Performance Improvements: Next.js’s renewed focus on its Rust-powered compiler showcases the commitment to improving both development and production build speeds. With the compiler surpassing 90% of the Next.js test suite, the future seems promising.

@brettjrea
brettjrea / commands.md
Last active April 19, 2023 14:53
Provision Windows Device Portal with a custom SSL certificate

Provision Windows Device Portal with the certification(s)

For each .pfx file that you've created for a device, you'll need to run the following command from an elevated command prompt.

Windows Command Prompt

WebManagement.exe -SetCert <Path to .pfx file> <password for pfx>
# Step 1: Open Windows Powershell from powerusers menu
Start-Process powershell -Verb runAs
# Step 2: Enable Windows Optional Feature Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Write-Host "Windows Optional Feature Microsoft-Windows-Subsystem-Linux is enabled."
# Enable Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
wsl --set-default-version 2
@brettjrea
brettjrea / install-github-cli.sh
Last active March 24, 2023 20:58
This is a bash script that installs the GitHub CLI on a system by checking if curl is already installed, installing it if it is not, and then adding the GitHub CLI repository to the apt sources list. It also updates the apt package list and installs the GitHub CLI. #!/bin/bash #GitHub_CLI #curl #package_manager
#!/bin/bash
# Install curl if not already installed
if ! type -p curl >/dev/null; then
sudo apt install curl -y
fi
# Install the GitHub CLI archive keyring
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
@brettjrea
brettjrea / configure-pm2.sh
Last active March 24, 2023 20:57
This is a bash script that defines directories for Strapi and Gatsby and creates an ecosystem.config.js file for running both projects in development mode with PM2. It removes any existing ecosystem.config.js files if they exist, creates a new ecosystem.config.js file in the home directory, and creates ecosystem.config.js files in the Strapi and…
#!/bin/bash
# Define the directories for Strapi and Gatsby
strapi_dir=~/my-backend
gatsby_dir=~/my-frontend
# Define the contents of the ecosystem.config.js file
ecosystem_config="module.exports = {
apps: [
{
@brettjrea
brettjrea / install-gatsby.sh
Last active March 24, 2023 20:56
This is a bash script that sets up a Gatsby project on a system by upgrading, updating, and removing unnecessary packages, installing Yarn, Git, and dependencies like typescript and gatsby-cli. It creates a new Gatsby project, adds dependencies like styled-components, gatsby-plugin-styled-components, babel-plugin-styled-components, gatsby-plugin…
#!/bin/bash
# Upgrade, update and remove unnecessary packages
sudo apt upgrade -y && sudo apt update -y && sudo apt autoremove -y
# Install Yarn and Git
npm install --global yarn
sudo apt install git -y
# Install dependencies
@brettjrea
brettjrea / install-strapi.sh
Last active March 24, 2023 20:55
This is a bash script that sets up a Strapi project on a system by installing required packages, creating a new Strapi project, and configuring it to run with PM2 as the process manager for Node. It also installs a GraphQL plugin and an init admin user plugin, sets up environment variables, and appends them to the existing .env file. #!/bin/bash…
#!/bin/bash
# Update package lists and upgrade packages to their latest versions
sudo apt update -y && sudo apt upgrade -y
# Remove any packages that are no longer required
sudo apt autoremove -y
# Install required packages for Strapi
sudo apt install libvips libvips-dev libvips-tools python gir1.2-vips-8.0 make g++ -y
@brettjrea
brettjrea / install-tools.sh
Last active March 24, 2023 20:55
This is a bash script that installs common languages, utilities, fetchers, compilers, and a JSON processor on an Ubuntu-based system using the package manager. It also installs the libsecret library for secure password storage and specifies the directories where the library files and header files are typically located. #!/bin/bash #Ubuntu #packa…
#!/bin/bash
# Install common languages
sudo apt install python3 -y
# Install Common Utilities
sudo apt install nano net-tools zip -y
# Install Common Fetchers
sudo apt install curl git wget -y
#!/bin/bash
# update and upgrade packages
sudo apt update -y && sudo apt upgrade -y
# remove unused packages
sudo apt autoremove -y
sudo apt install git curl procps -y
export NVS_HOME="$HOME/.nvs"