Skip to content

Instantly share code, notes, and snippets.

View EmranAhmed's full-sized avatar
🏠
Working from home

Emran Ahmed EmranAhmed

🏠
Working from home
View GitHub Profile
@EmranAhmed
EmranAhmed / install_mysql.sh
Last active August 7, 2022 11:11 — forked from rrosiek/install_mysql.sh
vagrant mysql, phpmyadmin install
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@EmranAhmed
EmranAhmed / NginxRedirect.md
Created March 3, 2015 12:47 — forked from esfand/NginxRedirect.md
NGINX Redirect, Rewrite

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

onAfterDispatch
onAfterExecute
onAfterInitialise
onAfterRender
onAfterRespond
onAfterRoute
onAfterSessionStart
onBeforeCompileHead
onBeforeExecute
onBeforeIndex
@EmranAhmed
EmranAhmed / wp-comment-walker
Last active August 29, 2015 14:25 — forked from georgiecel/wp-comment-walker
Custom comment walker for HTML5 friendly WordPress comment and threaded replies. To be inserted in functions.php.
<?php
class comment_walker extends Walker_Comment {
var $tree_type = 'comment';
var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
// constructor – wrapper for the comments list
function __construct() { ?>
<section class="comments-list">
@EmranAhmed
EmranAhmed / elixir-custom-tasks.js
Last active August 29, 2015 14:26 — forked from kepek/elixir-custom-tasks.js
Laravel 4 - Gulp / Elixir + Custom Tasks
var elixir = require('laravel-elixir');
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var minify = require('gulp-minify-css');
var _ = require('underscore');
/*
|--------------------------------------------------------------------------
| Uglify Task
|--------------------------------------------------------------------------
@EmranAhmed
EmranAhmed / zsh.md
Last active September 7, 2015 07:38 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu, zshell ubuntu, ohmyzsh ubuntu
@EmranAhmed
EmranAhmed / My Google Customized Search.md
Last active August 29, 2015 14:27
Google Customized Search for Chrome Browser

https://www.google.com/search?q=%s&amp;newwindow=1&amp;safe=active&amp;{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:bookmarkBarPinned}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}{google:omniboxStartMarginParameter}{google:contextualSearchVersion}ie={inputEncoding}

@EmranAhmed
EmranAhmed / california_nad83_zones_min.geojson
Last active August 29, 2015 14:27 — forked from zross/california_nad83_zones_min.geojson
Using geojson with Google Maps API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EmranAhmed
EmranAhmed / ngxdis
Last active August 29, 2015 14:27 — forked from fideloper/ngxdis
Nginx scripts for enable and disabling a site. This will create or destroy a symlink between a real config file in /etc/nginx/sites-available and a symlink in /etc/nginx/sites-enabled.
#!/usr/bin/env bash
if [ $EUID -ne 0 ]; then
echo "You must be root: \"sudo ngxdis\""
exit 1
fi
# -z str: Returns True if the length of str is equal to zero.
if [ -z "$1" ]; then
echo "Please choose a site."
@EmranAhmed
EmranAhmed / MirpurDOHS-Dhaka.geojson
Last active January 23, 2025 07:07
Bangladesh City, Area GeoJSON data like: Dhaka, Chittagong, Cox-Bazar, Area: Mirpur, Uttara Example: http://jsfiddle.net/jusnotor/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.