Skip to content

Instantly share code, notes, and snippets.

Muneer Shaheed imuneer

Block or report user

Report or block imuneer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple-https-server.py
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@imuneer
imuneer / .htaccess
Created Oct 25, 2016 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
View install_sublime_text.sh
#!/bin/sh
# Sublime Text 3 install with Package Control (last update: 12 July 2015)
#
# No need to download this script, just run it on your terminal:
#
# $ curl -L git.io/sublimetext | sh
#
# When you need to update Sublime Text, run this script again.
@imuneer
imuneer / UnauthorizedStrategy.php
Created May 20, 2015
BjyAuthorize's UnauthorizedStrategy to redirect guest to login page and other user not having permission to specific route to home
View UnauthorizedStrategy.php
<?php
namespace Application\View;
use BjyAuthorize\Service\Authorize;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\Http\Response as HttpResponse;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\ResponseInterface as Response;
You can’t perform that action at this time.