Skip to content

Instantly share code, notes, and snippets.

View sumonst21's full-sized avatar
💭
I may be slow to respond.

Md. Sumon Islam sumonst21

💭
I may be slow to respond.
View GitHub Profile
@sumonst21
sumonst21 / install_lamp_ubuntu.sh
Created July 4, 2023 11:14 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 22 - PHP development (php 7.4 / 8.2, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20/22 dev Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
@sumonst21
sumonst21 / start_ngrok_telegram_bot.sh
Created March 18, 2023 13:44 — forked from obokaman-com/start_ngrok_telegram_bot.sh
A bash script to start Ngrok in background, and send ngrok URL to a Telegram Bot automatically, copying the remote URL to clipboard
#!/usr/bin/env bash
# Start NGROK in background
echo "⚡️ Starting ngrok"
ngrok http 8080 > /dev/null &
# Wait for ngrok to be available
while ! nc -z localhost 4040; do
sleep 1/5 # wait Ngrok to be available
done
@sumonst21
sumonst21 / lamp-ubuntu16.sh
Created March 5, 2023 14:20 — forked from lyquix-owner/lamp-ubuntu16.sh
Bash script to setup LAMP server on Ubuntu 16.04
#!/bin/bash
# Check if script is being run by root
if [[ $EUID -ne 0 ]]; then
printf "This script must be run as root!\n"
exit 1
fi
DIVIDER="\n***************************************\n\n"
@sumonst21
sumonst21 / HighlightTextInPDF_NodeJs.md
Created February 24, 2023 22:20 — forked from groupdocs-cloud-gists/HighlightTextInPDF_NodeJs.md
Highlight Text in PDF using REST API in Node.js
@sumonst21
sumonst21 / gce_kms_notes.sh
Created February 24, 2023 14:52 — forked from kennwhite/gce_kms_notes.sh
Using Customer-supplied encryption keys with GCP for new full disk encryption in GCE
# These are my notes, circa Jan 17, 2017 for full volume encryption using customer supplied encryption keys (CSEK)
# Caveat emptor.
# Install Google Cloud Platform (GCP) SDK command line tools
curl -s -L -O -J https://sdk.cloud.google.com/
# (inspect and run it)
# Cloud KMS/keyring not needed for one-off volume encryption with CSEKs
# gcloud beta kms keyrings create KEYRING_NAME --location LOCATION
@sumonst21
sumonst21 / laravel-ci-cd-workflow.yml
Created February 23, 2023 09:37 — forked from JustinByrne/laravel-ci-cd-workflow.yml
Github Action to test laravel and then compile the assets to a production branch
name: CI/CD workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
testing:
@sumonst21
sumonst21 / deploy.php
Created February 22, 2023 21:47 — forked from oxguy3/deploy.php
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?php
/**
* deploy.php by Hayden Schiff (oxguy3)
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9
*
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal.
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms.
*/
// random string of characters; must match the "Secret" defined in your GitHub webhook
@sumonst21
sumonst21 / cPanel.yml
Created February 22, 2023 21:24 — forked from mahdyar/cPanel.yml
Deploy to cPanel with GitHub Actions (FTP)
name: Deploy to cPanel
on:
push:
branches:
- master
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
@sumonst21
sumonst21 / proxy.worker.js
Created February 19, 2023 13:37 — forked from abersheeran/proxy.worker.js
A proxy download cloudflare worker
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const url = getUrl(request)
@sumonst21
sumonst21 / PDFCreator_EmailAllResponses
Created February 15, 2023 00:40 — forked from andrewroberts/PDFCreator_EmailAllResponses
Google Apps Script to create a PDF from each of the rows in a Google Sheet
/*
PDF Creator - Email all responses
=================================
When you click "Create PDF > Create a PDF for each row" this script
constructs a PDF for each row in the attached GSheet. The value in the
"File Name" column is used to name the file and - if there is a
value - it is emailed to the recipient in the "Email" column.