Skip to content

Instantly share code, notes, and snippets.

View patheticGeek's full-sized avatar
🌚
Being haunted by bugs

Geek patheticGeek

🌚
Being haunted by bugs
View GitHub Profile
import type { ReactNode } from "react";
import type { Props as ReactIntlFormattedMessageProps } from "react-intl/src/components/message";
import { FormattedMessage as ReactIntlFormattedMessage } from "react-intl";
import enMessages from "./en.json";
// Our new union type of all available message IDs.
type IntlMessageKeys = keyof typeof enMessages;
// Extend the original FormattedMessage props.
type FormattedMessageProps = ReactIntlFormattedMessageProps<
@L04DB4L4NC3R
L04DB4L4NC3R / arch_std_install.md
Created May 16, 2020 13:10
ArchLinux Standard Installation

Installing Arch the Standard Way


Create a bootable pendrive

Run lsblk to see what is your pendrive

dd if= of=/dev/sd status="progress"
@mihow
mihow / load_dotenv.sh
Last active July 4, 2024 14:32
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@0x263b
0x263b / colors.md
Last active May 16, 2024 09:59
Random color from string in javascript

Random color from string in javascript

Consider a list of strings you need to permanently assign a random color.

First you should turn the string into a hash.

var string = "string"
var hash = 0
@trongthanh
trongthanh / gist:2779392
Last active June 25, 2024 08:04
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.