Skip to content

Instantly share code, notes, and snippets.

View hasinur1997's full-sized avatar
🎯
Focusing

Hasinur Rahman hasinur1997

🎯
Focusing
  • rtCamp
  • India
View GitHub Profile
@hasinur1997
hasinur1997 / git-commands.md
Last active March 14, 2023 06:58
Git commands

Common git commands

git add . ("Add all changes on current branch")

git status ("Display the state of the working directory")

git commit -m "Commit message" ("Added git commit message")

git commit --amend -m "New commit message" ("Changes the recent commit message")

@hasinur1997
hasinur1997 / wp-media.md
Last active September 19, 2022 15:13
WordPress Media upload using wp-media
@hasinur1997
hasinur1997 / wp-list-table.md
Created September 16, 2022 14:23
WordPress List Table Example

WordPress List Table

<?php
namespace Hasinur\Library\Admin;

use WP_List_Table;

class BookListTable extends WP_List_Table {
    public $books = [];
@hasinur1997
hasinur1997 / wp-rest-api.md
Created September 14, 2022 18:12
WP Rest Api
@hasinur1997
hasinur1997 / WordPress-Post.md
Last active September 14, 2022 14:20
WordPress Post

Create Post

wp_insert_post();

Get post

get_posts() get_post()

Update Post

wp_update_post()

Webscrapping using python

import requests
from bs4 import BeautifulSoup

response = requests.get("https://stackoverflow.com/questions");
soup = BeautifulSoup(response.text, "html.parser")
questions = soup.select(".question-summary")
sudo mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;
service mysql restart

Implementation of linked list

Node Class

class Node:
    def __init__(self, data):
        self.data = data
        self.next = None

LinkedList Class

#include<stdio.h>

void lexicalAnalyzer(char s[]);
int isIdent(char ch);
int isAlpha(char ch);
int isDigit(char ch);
int isOperator(char ch);
int isDelemeter(char ch);
void display(char s[100][32], int n);
@hasinur1997
hasinur1997 / binary-merge-algorithm.md
Created September 22, 2019 18:03
Merge sort and binary search algorithm

Binary Search and Merge sort algorithm

#include<stdio.h>
#define array_size 100

int arr[array_size];
int temp[array_size];
void merge(int startPoint, int midPoint, int endPoint);