Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Mehdi Hasan Khan mugli

I may be slow to respond.
View GitHub Profile
View notify-on-termin.js
// ==UserScript==
// @name Termin Notifier
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match*
// @icon
// @grant none
// ==/UserScript==
mugli / json_read.go
Created Feb 20, 2021 — forked from sugab/json_read.go
Read JSON File form a filePath. American movies dataset can be found here: 200,000+ Jeopardy question dataset can be found here:
View json_read.go
package main
import (
func readJSON(fileName string, filter func(map[string]interface{}) bool) []map[string]interface{} {
datas := []map[string]interface{}{}
mugli /
Last active Feb 16, 2021
go concurrency patterns collection
mugli / gist:9ff786fb83f76151be90b7a45b1f49d5
Created Aug 11, 2020 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos
View gist:9ff786fb83f76151be90b7a45b1f49d5

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]{}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{}
  5. Greg Young's [Unshackle Your Domain]{}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
mugli /
Created Jun 19, 2020 — forked from madyasiwi/
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 /
Last active Oct 20, 2020
Little bash script to repeatedly check if any appointment slot is available for Anmeldung (apartment registration) in Berlin
# Check if xidell is present (required for extracting from webpage using xpath)
if ! command -v xidel &> /dev/null
printf "\n\nCould not find xidel \n\n"
echo "You can install it with (on a mac):"
echo "brew install xidel"
mugli /
Created Apr 7, 2020 — forked from Kartones/
PostgreSQL command line cheatsheet


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)
View Twitter mute

Visit Open your browser's dev tools (note: this does work in Chrome) Paste the following code in:

const delayMs = 500; // change this if you feel like its running too fast

const keywords = `ActivityTweet
mugli /
Created Jan 16, 2020 — forked from erikreagan/
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 /
Created Nov 10, 2019 — forked from staltz/
The introduction to Reactive Programming you've been missing