Skip to content

Instantly share code, notes, and snippets.

View Ahmed-Galal's full-sized avatar

Ahmed Galal Ahmed-Galal

View GitHub Profile
@Ahmed-Galal
Ahmed-Galal / Python3 Virtualenv Setup.md
Created September 10, 2018 12:03 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@Ahmed-Galal
Ahmed-Galal / install virtualenv ubuntu 16.04.md
Created May 29, 2018 10:33 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@Ahmed-Galal
Ahmed-Galal / server.py
Created February 21, 2018 15:35 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
@Ahmed-Galal
Ahmed-Galal / Python3 HTTP Server.py
Created February 21, 2018 15:35 — forked from Integralist/Python3 HTTP Server.py
Python3 HTTP Server.py
import time
from http.server import BaseHTTPRequestHandler, HTTPServer
HOST_NAME = 'localhost'
PORT_NUMBER = 9000
class MyHandler(BaseHTTPRequestHandler):
def do_HEAD(self):
self.send_response(200)
@Ahmed-Galal
Ahmed-Galal / tmux-cheatsheet.markdown
Created January 22, 2018 12:07 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname