Skip to content

Instantly share code, notes, and snippets.

View moshiurse's full-sized avatar
🎯
Focusing

Moshiur Rahman moshiurse

🎯
Focusing
View GitHub Profile
@moshiurse
moshiurse / index.html
Created November 21, 2023 02:44
Image preloading
<body>
<div class="container">
<div class="image">
<div class="loader"><img src="loader.gif" alt="Loading..."></div>
<img src="https://images.unsplash.com/photo-1700406788223-2b053ac814ab?q=80&w=1972&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" /></div>
<div class="image">
<div class="loader"><img src="loader.gif" alt="Loading..."></div><img src="https://plus.unsplash.com/premium_photo-1699534955989-26a13746d060?q=80&w=2071&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" /></div>
<div class="image">
<div class="loader"><img src="loader.gif" alt="Loading..."></div><img src="https://images.unsplash.com/photo-1700410426386-704d39c87828?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" /></div>
@moshiurse
moshiurse / Shopify-App-Deployment.md
Created September 18, 2023 09:54
Shopify App Dedployment Process (Laravel, react)

create a folder in /var/www

cd /var/www

sudo chmod -R 777 .

mkdir slidecart

Getting projects from git repo

@moshiurse
moshiurse / README.md
Last active September 11, 2023 09:10
Digitalocean Droplet setup
@moshiurse
moshiurse / README.md
Last active August 28, 2023 12:09
Customized docker image for Shopify development

Installed software

Curl

apt install curl

curl --version

Nodejs with Nvm

@moshiurse
moshiurse / README.md
Created August 24, 2023 01:18
Migration from CRA to Vite

First, install Vite and all React related libraries (here: Vite's React Plugin) as development dependencies:

npm install vite @vitejs/plugin-react --save-dev

Create a vite.config.ts onn root path

import react from '@vitejs/plugin-react';

export default defineConfig(() =&gt; {
@moshiurse
moshiurse / index.html
Created August 23, 2023 02:06
CSS GRID example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Css grid</title>
</head>
<style>
.container {
@moshiurse
moshiurse / app.js
Last active August 8, 2023 05:18
Google Map Autocomplete
function initMap() {
var inputs = document.querySelectorAll('.pac-input');
inputs.forEach(input => {
const autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.addListener('place_changed', function() {
onPlaceChanged(autocomplete);
});
})
}
@moshiurse
moshiurse / readme.md
Created July 25, 2023 09:28
Install tar.gz file in linux
  1. Download the desired .tar.gz or (.tar.bz2) file.
  2. Open Terminal
  3. Extract the .tar.gz or (.tar.bz2) file with the following commands

    tar xvzf package.tar.gz
    tar xvjf package.tar.bz2

  4. Navigate to the extracted folder using cd command

    cd package

  5. Now run the following command to install the tarball

    ./configure
    > make

@moshiurse
moshiurse / autocomplete.html
Created March 20, 2023 08:09
Raw JS Autocomplete
<input type="text" id="autocomplete-input">
<ul id="autocomplete-list"></ul>
<div class="userinfo">
Latitude: <span id="id"></span><br>
Longitude: <span id="name"></span><br>
</div>