Skip to content

Instantly share code, notes, and snippets.

View AkashRajvanshi's full-sized avatar
😎
DevOps

Akash Rajvanshi AkashRajvanshi

😎
DevOps
View GitHub Profile

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.

@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

Arch Linux btrfs install

0. Prerequisites

  1. Latest Arch Linux install iso because those have newer kernels and more bugfixes in btrfs.
  2. Have previous experience with installing Arch (like you can install arch with a blind fold).

1. Parititions

We will ne two of them, one for /boot and the other one will be a btrfs partition with subvolumes.

  1. /dev/sda1 - this will be /boot with vfat filesystem because UEFI or syslinux for legacy BIOS boot
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)
@AkashRajvanshi
AkashRajvanshi / run_RPI4B_from_SSD.md
Created June 2, 2020 07:43
Run a Raspberry Pi 4B from an SSD connected to a USB-3 port

Run Raspberry Pi 4 from SSD

Introduction

This gist builds on the excellent work done by Graham Garner, Andreas Spiess, and Peter Scargill to make it easy for Makers to install IOTstack on a Raspberry Pi.

One concern with any out-of-the-box Raspberry Pi is the limited lifespan of its SD card. You'd be pretty annoyed if you got your IOTstack up and running, only to find that you were one of the unlucky ones whose SD card wore out in less than six months!

SSDs, on the other hand, while not immune to the same kinds of failure, tend to have projected life expectancies in the hundreds of years.

@AkashRajvanshi
AkashRajvanshi / mysql-docker.sh
Created June 6, 2020 05:22 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@AkashRajvanshi
AkashRajvanshi / postgres-dump-restore.markdown
Created June 9, 2020 08:08 — forked from jeremykendall/postgres-dump-restore.markdown
PostgreSQL: dump and restore (to db with different name and roles even)

Postgres Export and Import

Export

pg_dump -U [superuser] -Fc [dbname] > db.dump

Import

@AkashRajvanshi
AkashRajvanshi / multiple_ssh_setting.md
Created March 5, 2021 11:15 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@AkashRajvanshi
AkashRajvanshi / generate-ssh-key.sh
Created March 28, 2021 07:13 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa