Skip to content

Instantly share code, notes, and snippets.

@timpamungkas
timpamungkas / docker-compose.yml
Created April 22, 2022 01:47
Docker compose for kafka & ksqldb
version: "3"
networks:
kafka-net:
name: kafka-net
driver: bridge
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active May 8, 2024 06:29
Block Meta and Twitter (nginx)
@abdisaDev
abdisaDev / undo commits
Created November 27, 2023 04:54
wanna undo commits?
git reset --hard HEAD^ # To remove last commit
git reset --hard HEAD~3 # To remove last 3 commits

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@aljbri
aljbri / idm_reset_trial.md
Last active May 8, 2024 06:24
Internet Download Manager reset trial

IDM reset trial

Internet Download Manager (IDM) has two registry keys that are used to save the installation timestamp that considers the starting of the trial time. For resetting the timer both keys have to be deleted, besides other configurations that have to be reset to the default configuration.


To reset the time you can do it either by using the original setting that was used while installing the application for the first time. ConfigTime and MData have to be deleted, and the Thread value has to be set to 1 while the Model value will be set to 0x68. in addtion, you have to delete the IDM setting folder in this path %appdata%\IDM

  • copy the folowing code and save it in reg file
@mlocati
mlocati / win10colors.cmd
Last active May 8, 2024 06:23
ANSI Colors in standard Windows 10 shell
@echo off
setlocal
call :setESC
cls
echo %ESC%[101;93m STYLES %ESC%[0m
echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m
echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m
echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m
@roalcantara
roalcantara / XDG.cheat-sheet.md
Last active May 8, 2024 06:23
XDG cheat sheet

XDG - Base Directory Specification

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@syneart
syneart / meld_hotfix_sonoma.sh
Last active May 8, 2024 06:23
Meld v3.21.0(r4) hotfix on MacOS with Sonoma(14) Intel CPU / Apple silicon (M1,M2,M3) CPU with Rosetta
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
### !!! Note: You need put the Meld.app r4 build to the /Applications path first.
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
@MIbtehajNasar
MIbtehajNasar / setup_multiple_ssh_key.md
Created November 23, 2023 12:33
Setup Multiple SSH Keys for Different GitHub Accounts on a Single Machine

Setup Multiple SSH Keys for Different GitHub Accounts on a Single Machine

This guide will show you how to set up multiple SSH keys for different GitHub accounts on a single machine.

Step 1: Create Different Public Keys

To create different SSH keys, use the following command:

@dmmeteo
dmmeteo / 1.srp.py
Last active May 8, 2024 06:22
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):