Skip to content

Instantly share code, notes, and snippets.

View AmosAidoo's full-sized avatar
🎯
Focusing

Amos Aidoo AmosAidoo

🎯
Focusing
View GitHub Profile
@mjackson
mjackson / redirects-in-react-router-v6.md
Last active November 12, 2023 07:32
Notes on handling redirects in React Router v6, including a detailed explanation of how this improves on what we used to do in v4/5

Redirects in React Router v6

An important part of "routing" is handling redirects. Redirects usually happen when you want to preserve an old link and send all the traffic bound for that destination to some new URL so you don't end up with broken links.

The way we recommend handling redirects has changed in React Router v6. This document explains why.

Background

In React Router v4/5 (they have the same API, you can read about why we had to bump the major version here) we had a <Redirect> component that you could use to tell the router when to automatically redirect to another URL. You might have used it like this:

@citruz
citruz / QEMU_ON_M1.md
Last active June 6, 2024 08:29
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@niw
niw / README.en.md
Last active July 23, 2024 15:51
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@mickeypash
mickeypash / gist:b0b22ab84495fe4b033895a79dd78468
Last active May 19, 2024 07:26
George Hotz - talking hour - 2020-08-31
@zobayer1
zobayer1 / Makefile
Last active May 24, 2024 08:53
Generic Makefile for C++ projects with multiple cpp and h files
# Pre-compiler and Compiler flags
CXX_FLAGS := -Wall -Wextra -std=c++17 -ggdb
PRE_FLAGS := -MMD -MP
# Project directory structure
BIN := bin
SRC := src
LIB := lib
INC := include
MAINFILE := $(SRC)/main.cpp
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active July 29, 2024 19:18
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@jph00
jph00 / blog_test.ipynb
Created January 19, 2020 22:03
/nbs/blog_test.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shcyiza
shcyiza / car_brands.json
Created September 2, 2019 21:30
list of car brands name and logo in JSON format
[
{
"logo": "https://www.car-logos.org/wp-content/uploads/2011/09/abarth1.png",
"name": "Abarth"
},
{
"logo": "https://www.car-logos.org/wp-content/uploads/2011/09/ac-cars.png",
"name": "AC"
},
{
@EDDYMENS
EDDYMENS / countries.json
Created June 22, 2019 10:11
List of countries with their currencies and codes details in JSON
[
{
"COUNTRY": "AFGHANISTAN",
"COUNTRY_CODE": "AFG",
"CURRENCY_CODE": "AFA",
"NAME_OF_CURRENCY": "Afghani"
},
{
"COUNTRY": "ALBANIA",