Skip to content

Instantly share code, notes, and snippets.

View b4u7's full-sized avatar
Drinking coffee

Daniel b4u7

Drinking coffee
View GitHub Profile
@qoomon
qoomon / conventional_commit_messages.md
Last active May 3, 2024 21:49
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@Fobxx
Fobxx / shige-skins.md
Last active April 29, 2024 15:49
Shigetora skins
@sebmarkbage
sebmarkbage / The Rules.md
Last active April 22, 2024 04:41
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.

@luluco250
luluco250 / MouseRaw.cpp
Last active April 16, 2024 08:51
Getting raw mouse input with the native Windows API
/*
Example of how to get raw mouse input data using the native Windows API
through a "message-only" window that outputs to an allocated console window.
Not prepared for Unicode.
I don't recommend copy/pasting this, understand it before integrating it.
*/
// Make Windows.h slightly less of a headache.
#define NOMINMAX
@lydell
lydell / bigrams-to-pairs.js
Created August 23, 2015 08:54
English bigram and letter pair frequencies from the Google Corpus Data in JSON format
// By Simon Lydell 2015.
// This file is in the public domain.
var stdin = require("get-stdin")
var tools = require("text-frequencies-analysis")
var helpers = require("text-frequencies-analysis/lib/helpers")
stdin(function(text) {
process.stdout.write(tools.jsonStringifyRow(convert(JSON.parse(text))))
})

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007