Skip to content

Instantly share code, notes, and snippets.

View HabeebCycle's full-sized avatar

Habeeb Okunade HabeebCycle

View GitHub Profile
@HabeebCycle
HabeebCycle / application.yaml
Created January 22, 2021 02:48
reactive-api-redis-demo
spring:
application:
name: Spring-Reactive-Data-Redis
# Redis DB configuration
redis:
host: localhost
port: 6379
database: 0
password: 50M3*S3cured*Pa55W0rd

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

version: '2.1'
services:
php:
tty: true
build:
context: .
dockerfile: tests/Docker/Dockerfile-PHP
args:
version: cli
volumes:
@HabeebCycle
HabeebCycle / docker_wordpress.md
Created September 23, 2020 13:39 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@HabeebCycle
HabeebCycle / node_nginx_ssl.md
Created September 20, 2020 12:58 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@HabeebCycle
HabeebCycle / clean_code.md
Created March 12, 2020 11:50 — forked from wojteklu/clean_code.md
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

@HabeebCycle
HabeebCycle / big-o-java-collections.md
Created February 6, 2019 03:26 — forked from FedericoPonzi/big-o-java-collections.md
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)