Skip to content

Instantly share code, notes, and snippets.

View AkashRajvanshi's full-sized avatar
😎
DevOps

Akash Rajvanshi AkashRajvanshi

😎
DevOps
View GitHub Profile
@AkashRajvanshi
AkashRajvanshi / Windows+Linux+Notes.md
Created April 23, 2020 15:31 — forked from upretip/Windows+Linux+Notes.md
noting down steps taken to effectively using Linux subsystem on windows

Windows Subsystem for Linux (WSL Docs)

To start the WSL:

  • turn windows features on or off (I usually search that on windows menu)
  • Then find windows subsystem for linux and click checkbox
  • It may require restart the computer
  • Go to Microsoft store and download and install Ubuntu

Corey Schafer has an excellent video on how to install

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@AkashRajvanshi
AkashRajvanshi / postgres-cheatsheet.md
Created April 2, 2020 09:27 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@AkashRajvanshi
AkashRajvanshi / CalibreServerOnLinux.md
Created March 26, 2020 05:31 — forked from plembo/CalibreServerOnLinux.md
Calibre Server on Linux

Calibre Server on Linux

Introduction

Calibre is a powerful cross-platform, open source, ebook manager and editing platform. Its calibre-server component can be used to publish an e-book library on a local network. While you can launch calibre-server as a desktop application, it can also be run as a daemon on a headless Linux server.

This tutorial on setting up calibre-server using Ubuntu 14.04 is very good, but dated.

@AkashRajvanshi
AkashRajvanshi / regex.md
Created March 25, 2020 03:54 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@AkashRajvanshi
AkashRajvanshi / devops_best_practices.md
Created March 10, 2020 16:09 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud

#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@AkashRajvanshi
AkashRajvanshi / ssh-config-basic
Created September 29, 2019 19:34 — forked from mjalajel/ssh-config-basic
SSH Recipes
# Example ssh config file. Usually located in ~/.ssh/config (user) or /etc/ssh/ssh_config (system)
# This works on both linux and MacOS
# Basic ssh commands converted to ssh/config file format
# Simplest format
# Run with: "ssh blog" => (equivalent to: "ssh ubuntu@example.com" and "ssh -i ~/.ssh/id_rsa -p 22 ubuntu@example.com")
Host blog