Skip to content

Instantly share code, notes, and snippets.

View akkefa's full-sized avatar
💻
Grit

Ikram Ali akkefa

💻
Grit
View GitHub Profile
@akkefa
akkefa / tmux-cheatsheet.markdown
Created January 30, 2019 13:10 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@akkefa
akkefa / pytest.sh
Created May 23, 2018 10:03 — forked from amatellanes/pytest.sh
Useful py.test commands.
py.test test_sample.py --collect-only # collects information test suite
py.test test_sample.py -v # outputs verbose messages
py.test -q test_sample.py # omit filename output
python -m pytest -q test_sample.py # calling pytest through python
py.test --markers # show available markers
@akkefa
akkefa / README-Template.md
Created March 15, 2018 05:50 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@akkefa
akkefa / Makefile
Created March 6, 2018 13:32 — forked from rochacbruno/Makefile
Python Setup Tips and Tricks http://j.mp/setup_py
.PHONY: test install pep8 release clean
test: pep8
py.test --cov -l --tb=short --maxfail=1 program/
install:
python setup.py develop
pep8:
@flake8 program --ignore=F403 --exclude=junk
@akkefa
akkefa / gist:a0827f12b67873de15543bd0c5a0f01f
Created February 28, 2018 08:11 — forked from miohtama/gist:5389146
Decoding emails in Python e.g. for GMail and imapclient lib
import email
def get_decoded_email_body(message_body):
""" Decode email body.
Detect character set if the header is not set.
We try to get text/plain, but if there is not one then fallback to text/html.
:param message_body: Raw 7-bit message body input e.g. from imaplib. Double encoded in quoted-printable and latin-1
@akkefa
akkefa / 1. Install python3.6 & pip3.md
Created February 23, 2018 13:25 — forked from alyssaq/1. Install python3.7 & pip3.md
python3.6 setup on Mac 10.13 (High Sierra)
  1. Install Python 3.6.x from https://www.python.org/downloads/ or via homebrew
    Check that python3 has been installed by running it at the terminal:
$ python3
>>> Python 3.6.4
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
@akkefa
akkefa / 1. Install python3.6 & pip3.md
Created February 23, 2018 13:25 — forked from alyssaq/1. Install python3.7 & pip3.md
python3.6 setup on Mac 10.13 (High Sierra)
  1. Install Python 3.6.x from https://www.python.org/downloads/ or via homebrew
    Check that python3 has been installed by running it at the terminal:
$ python3
>>> Python 3.6.4
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
@akkefa
akkefa / gist:8b974ac297f6fa61538179971bced0c8
Created April 12, 2017 02:42 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using: