Skip to content

Instantly share code, notes, and snippets.

@DomPizzie
DomPizzie / README-Template.md
Last active May 7, 2024 15:11
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@sebmarkbage
sebmarkbage / The Rules.md
Last active May 7, 2024 15:01
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.

@jgcastro89
jgcastro89 / GEPP
Created October 17, 2017 17:16
Gaussian Elimination with Partial Pivoting Modularized
import numpy as np
class GEPP():
"""
Gaussian elimination with partial pivoting.
input: A is an n x n numpy matrix
b is an n x 1 numpy array
output: x is the solution of Ax=b
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active May 7, 2024 14:59
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@rndD
rndD / sendgrid-webhook-events.type.ts
Last active May 7, 2024 14:58
Sendgrid webhook events ts type
// @see https://docs.sendgrid.com/for-developers/tracking-events/event
// There is a mistake in the offical doc. Category is array of strings. I took it from the real webhook call.
type BaseSendgridEvent = {
email: string;
timestamp: number;
'smtp-id': string;
category: string | string[];
sg_event_id: string;
sg_message_id: string;
@jlblancoc
jlblancoc / Install_gcc7_ubuntu_16.04.md
Last active May 7, 2024 14:57
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

@willurd
willurd / web-servers.md
Last active May 7, 2024 14:57
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@csm10495
csm10495 / locked_cookie_test.py
Last active May 7, 2024 14:56
POC that fetches cookies from a locked cookies file on Windows with Chromium based browsers
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 7, 2024 14:54
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@ahmeti
ahmeti / only-number.directive.md
Last active May 7, 2024 14:54
Angular 5 - Only Number Input, Only Number Decimal