Skip to content

Instantly share code, notes, and snippets.

View rakibhasansabbir's full-sized avatar
:octocat:
Working for DocTime

Rakib Hasan Sabbir rakibhasansabbir

:octocat:
Working for DocTime
View GitHub Profile
@rakibhasansabbir
rakibhasansabbir / base_sites_available_configuratoion.conf
Last active July 26, 2023 08:26
Every time a new project arises, we have to set up the sites configuration, but this is not something we have to remember to do.
<VirtualHost *:80>
ServerName local.your_domain.test
ServerAdmin webmaster@thedomain.com
DocumentRoot /var/www/project_root_directory
<Directory /var/www/project_directory_name>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@rakibhasansabbir
rakibhasansabbir / install_older_postman_version.md
Last active June 14, 2024 00:02
Install older postman version(7.35.5) on linux
@rakibhasansabbir
rakibhasansabbir / How_to_use_existing_SSH_key_on_my_newly_installed_ubuntu.md
Last active September 24, 2022 06:44
How to use existing SSH key on my newly installed Ubuntu

If you have a copy of your ssh keys (e.g., on a USB stick) then simply copy the key files to the ~/.ssh/ directory.

cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub

change permissions on file

sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
@rakibhasansabbir
rakibhasansabbir / linux_command.md
Last active February 16, 2021 07:35
To check the listening ports and applications on Linux

Run below command to check the listening ports and applications on Linux: sudo lsof -i -P -n | grep LISTEN

Kill running process to flow below command: kill -9 4469 //-- 4469 is the port number

Cron tab file (which command to run you can place here)

crontab -e

Check log (that means can check your scheduled command)

tail -f /var/log/syslog | grep CRON

@rakibhasansabbir
rakibhasansabbir / meta-tags.md
Last active January 5, 2024 19:37 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@rakibhasansabbir
rakibhasansabbir / arrayToAddArray.js
Created June 25, 2020 08:00
Adding array to another array example for javascript
const array1 = [1, 2, 3, 4, 5]
const array2 = [6, 7, 8, 9, 10]
// to add after
const newArray = [...array1, ...array2]
// to add before
const newArray = [...array2, ...array1]
@rakibhasansabbir
rakibhasansabbir / ChatHistoryTemplate.vue
Last active July 5, 2023 16:26
Sample chat template message with image using html CSS
<template>
<div class="msg-history">
<div class="incoming-msg-section">
<div class="incoming-msg-img">
<img src="https://ptetutorials.com/images/user-profile.png" alt="sunil">
</div>
<div class="incoming-msg-content">
<div class="msg-card">
<div class="msg-body">
<p class="message">
@rakibhasansabbir
rakibhasansabbir / Pusher_presence_channel_subscription.js
Last active November 14, 2021 19:14
Pusher presence channel subscription
pusher = new Pusher(process.env.PUSHER_APP_KEY, {
cluster: YOUR_PUSHER_APP_CLUSTER,
authEndpoint: YOUR_BASE_URL + '/broadcasting/auth',
auth: {
headers: {
Accept: 'application/json',
Authorization: YOUR_TOKEN
}
}
@rakibhasansabbir
rakibhasansabbir / canvas_rounded_image.js
Last active February 29, 2020 20:04
HTML canvas rounded image draw under clipping area
// save the context in its unaltered state
ctx.save();
// fill canvas with black
ctx.fillStyle="black";
ctx.fillRect(0,0,canvas.width,canvas.height);
// create clipping region which will display portion of image
// The image will only be visible inside the circular clipping path
ctx.beginPath();