Skip to content

Instantly share code, notes, and snippets.

View hasibomi's full-sized avatar

Hasibur Rahman Omi hasibomi

View GitHub Profile
@hasibomi
hasibomi / CountryCodes.json
Created July 3, 2022 06:08 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@hasibomi
hasibomi / letsencrypt-ssl.sh
Created January 7, 2022 09:38
Generate SSL certificate from Let's Encrypt for apache2. This script will work for other servers too. Change the line numbers 13, 15, 16 to save the certificates in your preference. Change line number 18 to restart your server.
#!/bin/bash
echo Please enter your domain...
read domain
DOMAIN=$domain
WILDCARD=*.$DOMAIN
echo "Generating SSL certificate for ${DOMAIN} & ${WILDCARD}"
@hasibomi
hasibomi / README.md
Last active October 4, 2021 14:23 — forked from geolimber/README.md
Install Python3.9.4 and Apache mod_wsgi on Debian (AWS Lightsail, EC2)

Install latest Python and Apache mod_wsgi on Debian (AWS Lightsail, EC2)

Step 1. Download python binaries

wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
tar zxvf Python-3.9.7.tgz
cd Python-3.9.7

Step 2. Configure building python from sources

@hasibomi
hasibomi / azure_devops_project_list.js
Last active April 18, 2021 06:43
Get the list of all projects of Azure DevOps with JavaScript. Forget manual counting ;-)
/**
* Get the list of all projects of Azure DevOps.
*
* Example output inside browser console:
* 1. Example 1
* 2. Example 2
* 3. Example 3
* and so on.
*/
function azure_devops_project_list() {
@hasibomi
hasibomi / country_state_city.sql
Created March 10, 2018 09:23
All countries with their associated states & cities
This file has been truncated, but you can view the full file.
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.18)
# Database: changehere
# Generation Time: 2018-03-09 19:26:05 +0000
@hasibomi
hasibomi / validate-email.php
Created February 22, 2018 18:55 — forked from MikeRogers0/validate-email.php
How to validate an email address with PHP
<?php
function validEmail($email){
// Check the formatting is correct
if(filter_var($email, FILTER_VALIDATE_EMAIL) === false){
return FALSE;
}
// Next check the domain is real.
$domain = explode("@", $email, 2);
return checkdnsrr($domain[1]); // returns TRUE/FALSE;
@hasibomi
hasibomi / install-php-71.sh
Created February 1, 2018 07:55
Upgrade from PHP 5.X.X to PHP 7.1 on an AWS EC2 Linux Server. Inspired by https://gist.github.com/mavieth/b6b3b622dd9f863ca2c7db2da04ab215
#!/bin/bash
echo "==============================="
echo "Installing PHP 7.1"
echo "==============================="
sudo yum install php71
echo "==============================="
echo "Installing PHP 7.1 additional commonly used php packages"
echo "==============================="
@hasibomi
hasibomi / install.php
Created January 25, 2018 14:26
Command line installation script to setup laravel project after cloning an application from git
#!/usr/bin/env php
<?php
/**
* Install bower dependencies
*/
function bowerInstall() {
if (! file_exists("app/assets/bower_components")) {
try {
echo shell_exec("cd app && bower install");
@hasibomi
hasibomi / gitcom.md
Created January 1, 2018 08:32 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

$ git init
@hasibomi
hasibomi / ssh-key.sh
Created November 8, 2017 06:09
Generate ssh key
#!/bin/sh
echo "Enter your email"
read EMAIL
ssh-keygen -t rsa -b 4096 -C "$EMAIL"