Skip to content

Instantly share code, notes, and snippets.

View moshiurse's full-sized avatar
🎯
Focusing

Moshiur Rahman moshiurse

🎯
Focusing
View GitHub Profile

Linux Command Line Primer

Terminal breakdown

what do moshiur@pc:~$ means ?

  • moshiur: The username of the current user
  • pc: The hostname of the server
  • ~: The current directory. In bash, which is the default shell, the ~, or tilde, is a special character that expands to the path of the current user’s home directory; in this case, it represents /home/sammy
  • $: The prompt symbol. This denotes the end of the command prompt, after which the user’s keyboard input will appear

root@webapp:/var/www# Logged in as a root in var/www directory

@moshiurse
moshiurse / lamp_install.md
Last active August 24, 2023 02:47
Lamp Stack Installation

Apache

sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw allow in “Apache”
sudo systemctl start apache2 // to start apache server
sudo systemctl status apache2 // to know the status 
sudo systemctl stop apache2 // to stop the server
@moshiurse
moshiurse / index.html
Created March 14, 2022 11:18
Redux core concept
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redux Plain</title>
</head>
<body>
@moshiurse
moshiurse / .htaccess
Created February 19, 2022 17:00
htaccess for create ssl site
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@moshiurse
moshiurse / sendmail.php
Created February 18, 2022 06:04
Php mail basic function
<?php
// the message
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$send_email = "moshiur.swe@gmail.com";
// the message
$to = "$send_email"; // note the comma
let numbers = [];
const total = 999999;
function createPrime() {
numbers[0] = 0;
numbers[1] = 0;
numbers[2] = 1;
@moshiurse
moshiurse / contact.html
Created April 26, 2020 18:32
Php get mail
<form class="row contact_form" action="contact_process.php" method="post" id="contactForm" novalidate="novalidate">
<div class="col-md-6">
<div class="form-group">
<input type="text" class="form-control" id="name" name="name" placeholder="Enter your name">
</div>
<div class="form-group">
<input type="email" class="form-control" id="email" name="email" placeholder="Enter email address">
</div>
<div class="form-group">
<input type="text" class="form-control" id="subject" name="subject" placeholder="Enter Subject">
@moshiurse
moshiurse / app.js
Created March 29, 2020 09:21
Excel export With Kendo Grid in angularjs
$scope.loadGridData = function(url) {
$scope.mainGridOptions = {
dataSource: {
transport: {
read: {
url: url,
dataType: "json"
}
},
pageSize: __grid_pagesize,
@moshiurse
moshiurse / FileConvertBase64.js
Created March 16, 2020 05:55
Convert any file to base64 in JS
$(document).ready(function (){
function getBase64File (file){
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = function () {
console.log(reader.result);
};
reader.onerror = function (error) {
@moshiurse
moshiurse / convertJsonObjectToArray.js
Created February 12, 2020 07:07
Get data from request and converting to array using key value
var url1 = "<?php echo base_url('issue/UnitDemandController/subdepotWiseStoreOrg') . '/'; ?>" + orgID + '/' + vocab_id;
$.ajax({
url: url1,
type:'post',
datatype:'json',
async: false,// without it array cannot process on time
success: function(result){
var i=0;
JSON.parse(result).map(item => {