Skip to content

Instantly share code, notes, and snippets.

@sebmarkbage
sebmarkbage / The Rules.md
Last active May 20, 2024 23:30
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@bespokoid
bespokoid / SpaceVim.md
Last active May 20, 2024 23:27
SpaceVim cheatsheet #tools
@jult
jult / jbt-rules.cf
Last active May 20, 2024 23:21
SpamAssassin rules
# Put this file under /etc/spamassassin/ and run an sa-update or reload amavis etc.
#
#--------------------------------------------------
# The only RBL I trust, UCEPROTECT1 (single IP, not IP-ranges or entire ISPs) http://uceprotect.net
#--------------------------------------------------
header RCVD_IN_UCEPROTECT1 eval:check_rbl_txt('uceprotect1', 'dnsbl-1.uceprotect.net')
describe RCVD_IN_UCEPROTECT1 Listed in dnsbl-1.uceprotect.net
tflags RCVD_IN_UCEPROTECT1 net
score RCVD_IN_UCEPROTECT1 1.8
@lonetwin
lonetwin / Git dot files management
Last active May 20, 2024 23:21
A simple way to manage dotfiles with git without silly symlinks and special tools. Just use negative matches in your .gitignore !
I like to manage dotfiles without having to mess with silly symlinks or having
to install/configure specific dotfile managament tools. So here's what I did:
$ cd ~
$ git init .
$ echo '*' > .gitignore # ignore all files by default
$ echo '!.bashrc' >> .gitignore # ...and then tell git what files not to *not* ignore
$ # ...add other files you may want to track to *not* ignore
$ git add .bashrc # now actually add the files to git
$ git add .gitignore # add the .gitignore to git
@rxaviers
rxaviers / gist:7360908
Last active May 20, 2024 23:21
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Teraflopst
Teraflopst / 麦克米伦7000高频词(释义).txt
Last active May 20, 2024 23:20
麦克米伦7000高频词,列表 & 释义
a n. 字母A;第一流的;学业成绩达最高标准的评价符号 abbr. [物]安(ampere)
abandon n. 放任;狂热 vt. 遗弃;放弃
abbreviation n. 缩写;缩写词
ability n. 能力,能耐;才能
able adj. 能;[经管] 有能力的;能干的 n. (Able)人名;(伊朗)阿布勒;(英)埃布尔
abnormal adj. 反常的,不规则的;变态的
aboard prep. 在…上 adv. 在飞机上;[船] 在船上;在火车上
abolish vt. 废除,废止;取消,革除
abortion n. 流产,堕胎,小产;流产的胎儿;(计划等)失败,夭折
about prep. 关于;大约 n. 大致;粗枝大叶;不拘小节的人 adj. 在附近的;四处走动的;在起作用的 adv. 大约;周围;到处 n. (About)人名;(法)阿布

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@raviagheda
raviagheda / github-action-ssh.md
Last active May 20, 2024 23:16
Github Action with EC2 using SSH
@kmatt
kmatt / void-wsl.txt
Last active May 20, 2024 23:15
Install Void Linux on WSL2
# Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5
# prompt ">" indicates Powershell commands
# prompt "$" are Linux shell commands
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi