Skip to content

Instantly share code, notes, and snippets.

View debMan's full-sized avatar
👓
learn, learn, and learn !

MohamadAli debMan

👓
learn, learn, and learn !
View GitHub Profile
@debMan
debMan / kafka-topics-partitions-replicas-reassignment.md
Last active November 26, 2020 16:17
The Kafka topics partitions replicas reassignment with replica increase

The Kafka topics partitions replicas reassignment with replica increase

The script gets a csv file with no header which contains kafka topics and the number of each topic's partitions and produces the JSON file to reassign and replicate. The replica broker numbers defined in the BROKERS array.

@debMan
debMan / curl.md
Created January 28, 2019 10:35 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@debMan
debMan / myAdjacencyListModel .sql
Created February 16, 2017 23:35
Adjacency List Model
CREATE TABLE [dbo].[cats](
[ID] [int] IDENTITY(0,1) PRIMARY KEY,
[SuperCatID] [int] NULL,
[CatName] [nvarchar](50) ,
[CatLevel] [tinyint] -- this field inserted with a trigger not directly
)
-- have a relation between ID and SuperCatID
ALTER TABLE [dbo].[cats] WITH CHECK ADD CONSTRAINT [FK_cats_cats] FOREIGN KEY([SuperCatID])
REFERENCES [dbo].[cats] ([ID])
@debMan
debMan / abjad.css
Created August 17, 2016 19:26
persian abjad css ul list style type
@counter-style abjad {
system: additive;
range: 1 1000;
additive-symbols: 1000 "\63A", 900 "\638", 800 "\636",
700 "\630", 600 "\62E", 500 "\62B", 400 "\62A", 300 "\634",
200 "\631", 100 "\642", 90 "\635", 80 "\641", 70 "\639",
60 "\633", 50 "\646", 40 "\645", 30 "\644",
20 "\6AF", 10 "\649", 9 "\637", 8 "\62D", 7 "\698",
6 "\648", 5 "\FEEB", 4 "\62F", 3 "\686",
2 "\67E", 1 "\627";
@debMan
debMan / Sublime Text 3 Build 3103 License Key - CRACK
Created July 3, 2016 21:44
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
#!/bin/bash
# this script is not written by me. Just using it and sharing it here.
# export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job
PID=$(pgrep gnome-session)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
# $bing is needed to form the fully qualified URL for
@debMan
debMan / file
Created June 18, 2016 01:08
freedom_public
{"0.40130784231338945":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEIgPgumrRsA1wySZR13tEjoHloC0kdiiy\r\njRMsmmYyC8bslnRMlc8JD45OCE7/bjdeOTVQSymGimTa+ECG8M9UFM3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCV2SfDf8AAAACiwn/AAAACZCz6nLCSLVs\r\noP8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAJPYA/0t2wneYehnU\r\n0ovbHFr+ZdD+HjWK0h2LX6oyLaxg39giAP9AruTcYhmGhmvfBke9vbPmL9+JYtC+\r\nfoFyaWnD2+3Hks7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBH3f8Wo1tuvBwDHkZBoC\r\nj4wR/hZQV19MSLPtbEkMF+19s4YBEO5iu1xQWNWQnB1tCdsyTCVSbTzRf8xW29Qk\r\nbFQDAQgHwv8AAABtBBgTCAAf/wAAAAWCV2SfDv8AAAAJkLPqcsJItWyg/wAAAAKb\r\nDAAAt1EA/RIRgFL/ZzNIz/638v3rVQgIMqKMkrsdrurSb2vDVJAdAQCi7UNJXv7k\r\n5677vMQ6/ZjyIX+4eaHo5zO0jxzlqpjA0Q==\r\n=YHav\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}