Skip to content

Instantly share code, notes, and snippets.

View williamukoh's full-sized avatar
🎧
Wired in... </>

William Ukoh williamukoh

🎧
Wired in... </>
View GitHub Profile
function loadModule(filename, module, require) {
const wrappedSrc = `
function(module, exports, require) {
${fs.readFileSync(filename, 'utf8')}
}(module, module.exports, require)
`;
eval(wrappedSrc);
}
@rishavpandey43
rishavpandey43 / git-commit-styleguide.md
Last active May 22, 2024 10:32
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

@aliesbelik
aliesbelik / benchmarking-tools.md
Last active May 21, 2024 10:25
Benchmarking & load testing tools
@qoomon
qoomon / conventional_commit_messages.md
Last active May 21, 2024 15:13
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

@seLain
seLain / gist:8bdf12c7196f3fccafdf067dec2696b2
Last active January 30, 2024 19:45
Fix the thing GitHub keeps saying “This branch is X commits ahead, Y commits behind”
ref stackoverflow:
https://stackoverflow.com/questions/41283955/github-keeps-saying-this-branch-is-x-commits-ahead-y-commits-behind
works by
1. git remote add upstream https://github/upstream/repo.git
2. git pull --rebase upstream master
2.1 git rebase --skip (if the conflicts are not true, skip the patches)
3. git push --force-with-lease origin master
If there are branches to fix
@trandaison
trandaison / starUML.md
Last active May 7, 2024 19:44
Get full version of StarUML
@sahilsk
sahilsk / kafka-cheat-sheet.md
Last active April 12, 2024 01:27 — forked from filipefigcorreia/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 22, 2024 13:17
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/