Skip to content

Instantly share code, notes, and snippets.

View vicradon's full-sized avatar
🥑
creating technical content

Osinachi Chukwujama vicradon

🥑
creating technical content
View GitHub Profile
@vicradon
vicradon / AZ-104-Notes.md
Last active December 28, 2023 13:49
Detailed notes for passing the Azure Administrator (AZ-104) certification

These are a collection of notes on different concepts covered in AZ-104 to bring them to my understanding as I study for my exam.

@vicradon
vicradon / Preview git branch changes before merge.sh
Created November 20, 2023 04:12
Preview git branch changes before merging
git fetch
git log HEAD..origin/main # show the diffs
git log -p HEAD..origin/main # show each patch
git diff HEAD...origin/main # show a single diff
@vicradon
vicradon / adding-stuff-to-path.md
Last active November 4, 2023 21:36
Adding Stuff to Path

Adding Stuff to Path

Welcome to another episode of Linux notes. Today, I'll briefly talk about adding stuff to Path on POSIX[1] systems.

So the PATH is a very long colon delimited string that gets extended whenever you add a new directory to it. It looks something like this:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin:/usr/local/sbin
@vicradon
vicradon / rb-install.sh
Created November 4, 2023 10:09
Install ruby on Mac
brew update
brew install ruby-build
brew install rbenv
rbenv install 3.2.2
rbenv global 3.2.2
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zsh_profile
source ~/.zsh_profile
theme download --password shpat_XXXXXXXXXXXXXXXXXXXXXX --store https://storeurl.myshopify.com --live
@vicradon
vicradon / run-single-test.sh
Created October 20, 2023 08:10
Run a single Cypress test spec
npx cypress run -s cypress/e2e/testset.cy.ts --headed --no-exit
@vicradon
vicradon / eventhandler.tsx
Last active October 30, 2023 19:00
How to handle form events in React Typescript
const handleInputChange = (event: FormEvent) => {
const target = event.target as HTMLInputElement | HTMLSelectElement;
const { name, value } = target;
setFormData({ ...formData, [name]: value });
};
@vicradon
vicradon / create-a-cosmos-db-doc.ts
Created August 19, 2023 08:03
Create a new document in a cosmos db container using an extra outputs binding
import {
app,
HttpRequest,
HttpResponseInit,
InvocationContext,
output,
} from "@azure/functions";
const cosmosDBOutput = output.cosmosDB({
connection: "CosmosDBConnection",
@vicradon
vicradon / source_rvm.sh
Created August 10, 2023 12:44
A way to source rvm when switching ruby version
source $(rvm 3.1.2 do rvm env --path)