Skip to content

Instantly share code, notes, and snippets.

View Monmoy042's full-sized avatar
🎯
Focusing

Khaled Md Saifullah Monmoy042

🎯
Focusing
View GitHub Profile
@Monmoy042
Monmoy042 / dht11SensorWithArduino.ino
Created December 4, 2022 07:09
DHT11 sensor test code
#include "DHT.h"
#define DHTPIN 10 // DHT sensor data pin connected to the Arduino
// Definer DHT sensor type
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
// Initialize DHT sensor
DHT dht(DHTPIN, DHTTYPE);
@Monmoy042
Monmoy042 / 01_basic.ino
Last active December 20, 2021 16:40
This gist is all about the coding of Arduino. From this gist anyone can learn how we can code an Arduino very easily. This gist will cove all the things that we need to know about the coding of Arduino.
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
@Monmoy042
Monmoy042 / cmdCommands.md
Last active December 24, 2021 13:53
Essential Windows cmd commands.

Check System Information

systeminfo

Check Date

date
date /t

Check Time

Root Password Recover in Linux System

Step-1

First we need to reboot the system.

Step-2

Secondly from the grub boot loader we need to press e from the keyboard. Here e means edit.

Step-3

Now go to end of the line number-4 and write rd.break Note: rd = rescue disk

Step-4

Then press Ctrl+X to load the system

Step-5

Git Basic Commands


Git version check

$ git --version

User Name and Email Setting

$ git config --global user.email "email@example.com"
$ git config --global user.name "Mona Lisa"

Show all network interface card(NIC) info

ip link

Interface configuration files

/etc/hostname
/etc/nsswitch.conf
/etc/resolv.conf

File Archive and Compression in Linux

Arhive Utility

tar -cvf [newDirectoryName].tar [directoryName]
Exp: tar -cvf archiveEtc.tar etc

Extract Archived Directory

tar -xvf [archivedDirectoryName]

VIM Editor

VIM is a terminal based text editor. It is very handy to use. This is the most powerful text editor that by default comes with almost all Unix/Linux system.

Basic guide of VIM editor has given below:

VIM Editor Basic Commands

Insert Mode --> Command = (i)
Escape Mode --> Command = (Esc)
File save and quit --> Command = (:x)

File permission & ownership in Linux

File permission and ownership is very important in linux system.

Types of file/directory in Linux System

  1. (-) = regular file : text/js//html/css/any file
  2. (d) = directory : regular directory
  3. (l) = link file : ls -l /dev/stdin
  4. (b) = block devices : ls -l /dev/sda --> (CD/DVD/HDD/ISO/USB)
  5. (s) = socket : ls -l /sun/rpcbind.sock
  6. (p) = pipe file : ls -l /run/initctl
@Monmoy042
Monmoy042 / systemAdministration.md
Last active July 29, 2021 05:01
In this gist I am going to discuss about one of the important topics of linux system administration. This gist is all about the create user and group and some other policies of linux system.

Linux User & Group Administration

There are three types of user we can see in the linux system
1) root : 0
2) System User : 1-999
3) Regular user: 1000+

Show all the user info