Skip to content

Instantly share code, notes, and snippets.

View vishnups1's full-sized avatar
๐Ÿ‘‹

Vishnupradeep vishnups1

๐Ÿ‘‹
  • Yahoo India
  • Bangalore
View GitHub Profile
@vishnups1
vishnups1 / crypto.md
Last active September 6, 2019 15:34 — forked from dreikanter/encrypt_openssl.md
Crypto & Network Security Stuffs

Algorithm Types

Encryption Algorithms       (AES, DES, RSA...)
Authentication Algorithms   (MD5, SHA-256, SHA-512, HMAC ...)

Security

Encryption Types:
Symmentric      Single key (K) will be used for Encryption and Decryption (AES, DES)

Asymmentric Two keys (KU, KR) will be used for Encryption and Decryption (RSA)

@vishnups1
vishnups1 / Display_response_header.md
Last active November 2, 2021 17:58 — forked from subfuzion/curl.md
curl POST examples
@vishnups1
vishnups1 / consul.md
Last active February 17, 2020 05:58 — forked from g0t4/glossary.md
Consul and related terms
  • Node - a physical or virtual machine that hosts services
    • Nodes also referred to as members.
    • Examples
      • Your computer
      • An AWS EC2 instance
      • A bare metal machine in your private data center
  • Service - executing software that provides utility via an interface
    • Typically long-lived process listening on a port(s)
    • Examples
  • A web server (nginx, apache, iis)
@vishnups1
vishnups1 / chef_cheatsheet.md
Last active April 29, 2020 13:25
chef_cheatsheet
  • Chef provides a Domain Specific Language (DSL) for specifying Infrastrcture as a Code and the automation necessary to deploy, configure, and manage servers based on that code.
  • Allowing the specification of what the final configuration should be and not the steps necessary to make that happen.
  • Multiparts: ChefDK (Development Kit), Chef Server and Chef Client.
  • Desired State Configuration:
    • Specify a server configuration's end result, not the steps to go there.
    • "Test and Repair" approach allows chef to only make changes necessary to get the server back to the desired state configuration.
    • If server is already in desired state, no changes will occur.
  • Two ways of applying configuration (Imperative & Declarative style)
    • Imperative Approach (This applies to an single entity and it's gonna differ based on entities)
@vishnups1
vishnups1 / ruby_cheatsheet_1.md
Last active May 2, 2020 14:00
ruby_cheatsheet
# This is a single line comment.

=begin
	This is a multiline comment.
=end

x = 10

print "#{x}\n"
@vishnups1
vishnups1 / python_cheats.md
Last active June 25, 2020 13:11
python_cheats

python requests

  • get request example:

    r = requests.get("url", params={}, auth=(username, password))
  • dir(r) to get response object attributes.

  • post request example:

@vishnups1
vishnups1 / lipc_101.md
Last active August 10, 2020 15:40
lpic preparation
  • Pseudo File System

    • Only exists in RAM while the system in running.
    • /proc contains information about the processes running on a system. Processes are are listed by PID.
    • /sys contains information about the systems hardware and kernel modules and no process information is listed here.
    • man proc for more info.
  • Linux Kernel Module

    • Linux kernel is the core framework of the operating system.
    • GNU/Linux (GNU-The Open Source Tools Project / Linux-The Actual Kernel).
    • Linux Kernel is Monolithic (it handles all memory and device management).
@vishnups1
vishnups1 / ansible_notes.md
Last active November 18, 2020 14:43
ansible_notes

Introduction to Playbooks and Common Modules

  • Know how to work with commonly used Ansible modules
  • Create playbooks to configure systems to a specified state
  • Use variables to retrieve the results of running commands
  • Use conditionals to control play execution
  • Configure error handling
  • Selectively run specified tasks in playbook using tags

Know how to work with commonly used Ansible modules

  • Core modules to be familiar with
@vishnups1
vishnups1 / go_modules_notes.md
Last active August 21, 2021 06:01
go_modules_notes

go modules notes:

  • go mod tidy
    • removes unused dependencies
    • adds the required dependencies
  • go get github.com/user/module
    • this will add github.com/user/project as dependency under go.mod
  • go mod why github.com/user/project
    • this provides information about where the package is used under a project
  • go get variations
  • go get github.com/julienschmidt/httprouter@latest to get the latest version of a package
@vishnups1
vishnups1 / dsa.md
Last active October 4, 2021 14:33
Data Structures And Algorithms

Data Strctures And Algorithm

  • Big O Notation is used to describe the performance of an alogrithm.
  • It is used to check if the algorithm is going scale well if the input grows really large.
  • O(n)

O(1)

  • O(1) notation
  • It doesn't matter how big the array is. It can be either one or one million items.
  • All we are doing below is printing the first item.
  • Below method has a single operation and takes constant amount of time to run.