Skip to content

Instantly share code, notes, and snippets.

View Ivanshamir's full-sized avatar
📖
reading.....

S. M. Shamir Imtiaz Ivanshamir

📖
reading.....
View GitHub Profile
@Ivanshamir
Ivanshamir / flask-app-kubernetes.md
Created August 10, 2024 21:31
DEPLOY A SIMPLE FLASK APPLICATION IN KUBERNETES
  1. Create the Flask REST API
from flask import Flask, jsonify

app = Flask(__name__)

@app.route('/')
def home():
    return jsonify(message="Hello, World!")
@Ivanshamir
Ivanshamir / namespace.md
Last active March 2, 2024 22:18
1.Networking using linux network namespaces

Commands:

  1. Let's familiar with some necessary terms:
  • Network interfaces allow us to establish communication between a network and a device.
  • routes define traffic paths. Definition: a route in networking specifies the path for network traffic from source to destination.
  • iptables configures packet filtering. Definition: iptables is a user-space utility for configuring packet filter rules in the Linux kernel's Netfilter framework. Whatis Netfilter framework: iptables operates within the Netfilter framework, which is a part of the Linux kernel responsible for packet filtering, network address translation (NAT), and other packet mangling tasks. Netfilter provides hooks within the Linux networking stack that allow iptables to intercept packets at various points in their journey through the system and apply the configured rules to them.
  • lo is a local loopback interface for testing,
  • eth0 is the primary Ethernet interface for external connections.
  1. First update apt: sudo apt update -y
@Ivanshamir
Ivanshamir / tsconfig.json
Created September 15, 2023 08:18
Recommended TSConfig from Matt Pocock
{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"target": "es2022",
"verbatimModuleSyntax": true,
"allowJs": true,
"resolveJsonModule": true,

25 Redis Interview Questions (ANSWERED) For Web Developers

Redis offers a great deal of support for developing efficient caching mechanisms. It takes only a couple of minutes to implement a cache mechanism and get it working with any application. Follow along to learn 25 most common Redis Interview Questions and Answers for your next senior web developer interview.

Q1: What is Redis?

Topic: Redis
Difficulty: ⭐

Redis, which stands for Remote Dictionary Server, is a fast, open-source, in-memory key-value data store for use as a database, cache, message broker, and queue.

You can run atomic operations, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.

@Ivanshamir
Ivanshamir / deque.js
Created April 6, 2023 19:09
Implement deque using linked list in js
class Node {
constructor(value) {
this.value = value;
this.next = null;
this.previous = null;
}
}
class Deque {
constructor() {
@Ivanshamir
Ivanshamir / queue.js
Created April 6, 2023 18:48
Implement queue using linked list in js
class Node {
constructor(value) {
this.value = value;
this.next = null;
}
}
class Queue {
constructor() {
this.head = null;
@Ivanshamir
Ivanshamir / stack.js
Created April 6, 2023 18:13
Stack implementation using linked list in js
class Node {
constructor(value) {
this.value = value;
this.next = null;
}
}
class Stack {
constructor() {
this.head = null;
@Ivanshamir
Ivanshamir / singly-linked-list.js
Last active April 2, 2023 17:51
CRUD operation in Singly linked list
class Node {
constructor(value, next = null) {
this.value = value;
this.next = next;
}
}
class LinkedList {
constructor(data) {
@Ivanshamir
Ivanshamir / redis_cheatsheet.bash
Created September 8, 2022 16:48 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.