This is the base of all my linux VM installs I use for docker etc
- Download netinst ISO from debian website
- Create a VM on your hypervsor
- VM Machine Spec:
- 200GB
- 2 CPU
- 4GB RAM
- Attach to external network
| import type {SanityClient} from '@sanity/client' | |
| import {v5 as uuidv5} from 'uuid' | |
| import {buildCollectionDocumentId, commitCollectionDocument} from './sanityOps' | |
| import type {ShopifyDocumentCollection} from './storageTypes' | |
| import {SHOPIFY_COLLECTION_DOCUMENT_TYPE, UUID_NAMESPACE_COLLECTIONS} from './constants' | |
| import {DataSinkCollection} from './requestTypes' | |
| import {idFromGid} from './requestHelpers' |
| -- For the latest version: | |
| -- https://gist.github.com/parterburn/e832b9090ee35eb830529de8bd978b82 | |
| -- Set this property to true to always open in a new window | |
| property open_in_new_window : false | |
| -- Set this property to false to reuse the current tab | |
| property open_in_new_tab : true | |
| -- Handlers |
| # Setup Stage - set up the ZSH environment for optimal developer experience | |
| FROM node:14-alpine AS setup | |
| # Let scripts know we're running in Docker (useful for containerised development) | |
| ENV RUNNING_IN_DOCKER true | |
| # Use the unprivileged `node` user (pre-created by the Node image) for safety (and because it has permission to install modules) | |
| RUN mkdir -p /app \ | |
| && chown -R node:node /app | |
| # Set up ZSH and our preferred terminal environment for containers | |
| RUN apk --no-cache add zsh curl git | |
| RUN mkdir -p /home/node/.antigen |
| # Note: for this to do anything, use my starter Dockerfile config (https://gist.github.com/arctic-hen7/10987790b86360820e2790650e289f0b) | |
| # This file contains ZSH configuration for your shell when you interact with a container | |
| # (we wouldn't want any boring `sh` now would we?) | |
| # Please feel free to set up your own ZSH config in here! | |
| # It gets mapped to your `.zshrc` for the root user in the container | |
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. |
Hi! This is a plugin I hacked together, to add another field staleWhileRevalidate to Apollo Server's @cacheControl directive!
To use this, you'll need to disable the built-in plugin by setting cacheControl: false in your Apollo Server config.
Then, add this plugin, and initialize it with the option calculateHttpHeaders: true (which Apollo Server normally enables by default).
const server = new ApolloServer({
// ...
cacheControl: false,
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql
Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql
-h is for host.
-p is for port.
-U is for username.
-d is for database.
| // See https://blog.isquaredsoftware.com/presentations/react-redux-ts-intro-2020-12/#/36 for slides | |
| // My basic render function structure: | |
| function RenderLogicExample({ | |
| someBoolean, // 1) Destructure values from `props` object | |
| someList, | |
| }) { | |
| // 2) Declare state values | |
| const [a, setA] = useState(0); | |
| const [b, setB] = useState(0); |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |