Skip to content

Instantly share code, notes, and snippets.

View mugli's full-sized avatar
🤷

Mehdi Hasan Khan mugli

🤷
View GitHub Profile
@mugli
mugli / anmeldung-termin-notifier.sh
Last active February 8, 2023 19:55
Little bash script to repeatedly check if any appointment slot is available for Anmeldung (apartment registration) in Berlin
#!/bin/bash
# Check if xidell is present (required for extracting from webpage using xpath)
if ! command -v xidel &> /dev/null
then
printf "\n\nCould not find xidel \n\n"
echo "You can install it with (on a mac):"
echo "brew install xidel"
exit
fi
@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)

Visit https://twitter.com/settings/muted_keywords 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
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.

@mugli
mugli / The Technical Interview Cheat Sheet.md
Created August 29, 2019 05:32 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@mugli
mugli / docker-rm-images.md
Created August 13, 2019 16:24 — forked from alferov/docker-rm-images.md
Remove all (untagged) images and containers from Docker
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")

References: