Skip to content

Instantly share code, notes, and snippets.

View nikelborm's full-sized avatar
🐢
chillin'

Eva nikelborm

🐢
chillin'
View GitHub Profile
@CMCDragonkai
CMCDragonkai / adts_in_typescript_javascript.md
Last active June 7, 2024 16:41
ADTs in TypeScript/JavaScript

ADTs in TypeScript/JavaScript

Here are the different ways of creating an algebraic datatype or a tagged value.

type Type = 'A' | 'B';
type Value = any;

type ADTTuple = [Type, Value];
type ADTNamed = { type: Type } & {};
@LarryIsBetter
LarryIsBetter / Linux Laptop Optimizations.md
Last active June 5, 2024 06:36
Linux Laptop Optimizations

I have a website now that includes a more dumbed down but straight forward version of this guide that isnt basied towards Arch Linux but considers most distros. https://linuxguidance.net/improve-battery-and-optimize-your-linux-laptop/

Everything I do in this guide is mostly taken from the Arch Wiki, and is for Arch Linux, obviously this can probably be applied to other Linux distributions especially Arch based ones, this guide is for people who want a laptop with similar effciency they had on Windows or MacOS. I hate the excuse of having to compromise on Linux to have good battery or thermals on laptops.

Please think of this guide as more of a starting point, if you're serious about fully optimizing your laptop research your laptop and the hardware inside of it as that can get you even further down the rabbit hole.

This guide assumes you have a relatively modern laptop with at least an SSD from the factory, if you don't, don't worry you can still probably follow this guide perfectly, if you have a 32-b

@EverettBerry
EverettBerry / aws-sql.md
Created March 16, 2022 01:13
AWS SQL Options
Service Description SQL Support Use Case
RDS Postgres, MySQL, etc. Full Small-medium web apps
Aurora Serverless databases Full Serverless apps
Redshift Data warehouse Full OLAP, Petabytes of data, analytics
DynamoDB NoSQL database Some - PartiSQL Ecommerce, building fast
Keyspaces Managed Cassandra (key value) Some - CQL Messaging
Neptune Graph database Some - openCypher
---
- hosts: legacyservers
gather_facts: yes
become: yes
tasks:
# Use a block to perform tasks conditionally—only if running Ubuntu 18.04.
- block:
@joseluisq
joseluisq / resize_disk_image.md
Last active June 25, 2024 17:37
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@MaxXor
MaxXor / btrfs-guide.md
Last active June 10, 2024 15:46
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@vorozhba
vorozhba / Как удалить commit в Github.txt
Last active June 24, 2024 07:39
Как удалить commit в Github
1. Получаем хэш-код коммита, к которому хотим вернуться.
2. Заходим в папку репозитория и пишем в консоль:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force
@Imater
Imater / HighMiddle примеры рекомендованных знаний.md
Last active April 29, 2024 22:32
Рекомендованные знания для React разработчика high middle

Рекомендованные знания для React разработчика high middle

React

  • Варианты создания компонента (pureFunction, class, createElement)
  • pureRender - знания принципа ререндера Реакт приложений при изменениях хранилищ, какие props приводят к неоправданному перерендеру, кеширование результатов функций
  • Контейнер - его назначение, основные задачи, типовая структура
  • Глупый компонент - его назначение, основные задачи, принцип разбиения на компоненты, функции
  • React router - как создавать синхронный, асинхронный роутер, как отложить рендер компонента в Route на время загрузки, как работает функция match, как считывать параметры url ?q=1, #q=1 как их устанавливать при .
  • Последовательность DOM render, последовательность вызова всех функций компонента, например componentDidMount, componentWillMount, componentWillReceiveProps и всех остальных. Как использовать ref, в какой момент он вызывается.
@ygotthilf
ygotthilf / jwtRS256.sh
Last active June 26, 2024 07:11
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@michalczukm
michalczukm / .gitignore
Created August 5, 2015 08:58
WPF projects .gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/