Skip to content

Instantly share code, notes, and snippets.

View MuhammadSawalhy's full-sized avatar
📚
أحوال أن أزداد علما ما حييت

محمد الصوالحي MuhammadSawalhy

📚
أحوال أن أزداد علما ما حييت
View GitHub Profile
//Self-Signed Certificate for using with VS Code Live Server
//Save both files in a location you will remember
1. create a private key
openssl genrsa -aes256 -out localhost.key 2048
// you will be prompted to provide a password
//this will create localhost.key (call it whatever you like)
2. create the certificate
@sharmaeklavya2
sharmaeklavya2 / segtree.cpp
Last active January 27, 2024 09:13
Generic SegTree
// See codechef FLIPCOIN for an example
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <vector>
/*
Output of segment tree range queries are modelled as elements of a monoid.
Updates on the segment tree are functions on the monoid.
@felicianotech
felicianotech / cci-node-multiversion-after-example.yml
Created November 16, 2018 15:05
An example CircleCI 2.1 config building with multiple versions of Node.js.
version: 2.1
workflows:
main:
jobs:
- unit-tests:
version: 6
- unit-tests:
version: 8
- unit-tests:
@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 13:51
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