Skip to content

Instantly share code, notes, and snippets.

View Mansour-J's full-sized avatar
👨‍💻
There’s no place like 127.0.0.1

Mansour Mansour-J

👨‍💻
There’s no place like 127.0.0.1
View GitHub Profile
@Mansour-J
Mansour-J / kafka-local-docker-compose.yaml
Created June 18, 2025 13:48 — forked from erikkinding/kafka-local-docker-compose.yaml
Docker compose for local Kafka setup with kafka-ui
# This setup allows you to both connect from within the docker-compose context as well as from services running on your local
# machine but not as part of the docker-compose setup. Any client connecting to the broker from the outside can connect to
# localhost:9092 while services running as part of the docker-compose connect to broker:9093.
#
# To access kafka-ui: http://localhost:7777
#
# I hope this helps someone out there! :)
version: '3'
networks:
@Mansour-J
Mansour-J / semantic-commit-messages.md
Created February 16, 2022 23:54 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Conventinal Commit Messages

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

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

Commit Formats

Default

Online Reservation System / Central Reservation System (CRS) is commonly used in travel and tourism industry for making online reservations for airline, hotel rooms, tour package , bus, car etc. to increase sales and customer’s reach across the globe. But it is majorly used in hotel industry.
http://www.hotelreservationssystem.com/index.html
Quality Award - http://www.hotelreservationssystem.com/onlinebookingsystems-internationalqualityaward.html
Here are some of the benefits of online reservation system.
Compatibility
@Mansour-J
Mansour-J / connect.js
Created November 24, 2020 02:28 — forked from gaearon/connect.js
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@Mansour-J
Mansour-J / github-clone-all.py
Created October 14, 2020 01:41 — forked from YuriyGuts/github-clone-all.py
Clone all public and private repositories from a specific GitHub user or organization
#!/usr/bin/env python
"""
Clone all public and private repositories from a GitHub user or organization.
Copyright (c) 2018 Yuriy Guts
usage: github-clone-all.py [-h] [--auth-user AUTH_USER]
[--auth-password AUTH_PASSWORD] [--clone-user USER]
[--clone-org ORG]
@Mansour-J
Mansour-J / thing.js
Created October 2, 2020 02:25 — forked from paulirish/thing.js
log the clipboard contents
document.body.innerHTML = 'Paste or drop items onto this page. View results in console.';
function getPayload(item) {
const kind = item.kind;
switch (kind) {
case 'string': return new Promise(res => item.getAsString(res));
case 'file': return Promise.resolve(item.getAsFile());
default: throw new Error('unknown item kind! ' + kind);
}
@Mansour-J
Mansour-J / what-forces-layout.md
Created October 2, 2020 02:18 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
import { Component } from "react";
export var Enhance = ComposedComponent => class extends Component {
static displayName = "Enhanced"
constructor() {
super();
this.state = { data: null };
}
componentDidMount() {
@Mansour-J
Mansour-J / greeny.itermcolors
Created November 4, 2019 01:34
Mansour's minimalistic customised iTerm theme
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,