Skip to content

Instantly share code, notes, and snippets.

View mugli's full-sized avatar
🤷

Mehdi Hasan Khan mugli

🤷
View GitHub Profile
@mugli
mugli / json_read.go
Created February 20, 2021 17:06 — forked from sugab/json_read.go
Read JSON File form a filePath. American movies dataset can be found here: https://raw.githubusercontent.com/prust/wikipedia-movie-data/master/movies.json. 200,000+ Jeopardy question dataset can be found here: https://www.reddit.com/r/datasets/comments/1uyd0t/200000_jeopardy_questions_in_a_json_file/.
package main
import (
"encoding/json"
"io/ioutil"
)
func readJSON(fileName string, filter func(map[string]interface{}) bool) []map[string]interface{} {
datas := []map[string]interface{}{}
@mugli
mugli / cloudSettings
Last active September 13, 2020 08:33
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-01-24T07:05:34.982Z","extensionVersion":"v3.4.3"}
@mugli
mugli / gist:9ff786fb83f76151be90b7a45b1f49d5
Created August 11, 2020 11:57 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
@mugli
mugli / django-shell-notebook-setup.md
Created June 19, 2020 13:49 — forked from madyasiwi/django-shell-notebook-setup.md
Guide to setup Django-shell Jupyter notebook running in Docker container

Setting Up Django-Shell Jupyter Notebook in Docker Container

This guide assumes that your django application already running in the container.

1. Install required python packages

You will have to make sure that django-extensions and jupyter packages are installed in the container's python virtual environment.

If you need to shell into the container as root user to do this, you can do so from the host PC:

@mugli
mugli / postgres-cheatsheet.md
Created April 7, 2020 17:03 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mugli
mugli / mac-apps.md
Created January 16, 2020 05:50 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@mugli
mugli / introrx.md
Created November 10, 2019 11:01 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@mugli
mugli / System Design.md
Created November 9, 2019 13:35 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fish"
# Clear earlier bindings, if any
bind --erase --all
# This is the default binding, i.e. the one used if no other binding matches
bind "" self-insert
bind \n execute
@mugli
mugli / sql-mongo_comparison.md
Created September 21, 2019 16:51 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.