Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 06:36
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bitterteasweetorange
bitterteasweetorange / keybindings.json
Last active May 8, 2024 06:33
setup vscode like neovim
[
{
"command": "projectManager.listGitProjects#sideBarGit",
"key": "cmd+o"
},
{
"command": "expand_region",
"key": "ctrl+=",
"when": "editorTextFocus"
},
@fridzema
fridzema / laravel-octane-on-forge.md
Last active May 8, 2024 06:32
Laravel octane(swoole) on forge / ubuntu server

Laravel

Configure octane laravel/octane

Server

PHP

Install swoole extension (place in corresponding .ini file(s)):

pecl install swoole
@peter-leonov
peter-leonov / lazy-list.js
Created May 21, 2017 21:07 — forked from gvergnaud/lazy-list.js
Lazy List, implemented with es6 generators
/* ----------------------------------------- *
Lazy List Implementation
* ----------------------------------------- */
// Haskell-like infinite List, implemented with es6 generators
// Lazyness lets you do crazy stuff like
List.range(0, Infinity)
.drop(1000)
.map(n => -n)
@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