Skip to content

Instantly share code, notes, and snippets.

View m7salam's full-sized avatar

Mohamed Hussein m7salam

View GitHub Profile
@m7salam
m7salam / Makefile
Created July 26, 2021 07:13 — forked from aprxi/Makefile
Makefile_docker_20190214
# --------------------------------------------------------------------
# Copyright (c) 2019 LINKIT, The Netherlands. All Rights Reserved.
# Author(s): Anthony Potappel
#
# This software may be modified and distributed under the terms of the
# MIT license. See the LICENSE file for details.
# --------------------------------------------------------------------
# If you see pwd_unknown showing up, this is why. Re-calibrate your system.
PWD ?= pwd_unknown
@m7salam
m7salam / cookiecutter-django backuprestore guide
Last active December 25, 2023 04:22
cookiecutter-django backup restore guide
steps to restore backups smoothly
=================================
** you must be logged in to the production server for this commands to working
#Side Note : dprod is an alias should be availabe in .bashrc, so any "dprod" command can be replaced with the following:
::
alias dprod="docker-compose -f production.yml"
@m7salam
m7salam / git.rst
Created March 18, 2020 12:57
git cheat sheet

Github Guide

Basic Commands

To work on dev

:

@m7salam
m7salam / login_mixins
Created October 30, 2019 04:24 — forked from erickgnavar/login_mixins
Django login required mixins
import json
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.utils.decorators import method_decorator
class LoginRequiredMixin(object):
@method_decorator(login_required)
def dispatch(self, request, *args, **kwargs):
# go A go
# go A go
# go B go
# go A go
# go C go
# go A go
# go B go
# go D go
# go A go
@m7salam
m7salam / gist:aae46b48a5f695c42cf51dc66d3f74e8
Created October 14, 2019 02:58
test python salesminded
class A(object):
def go(self):
print("go A go!")
def stop(self):
print("stop A stop!")
def pause(self):
raise Exception("Not Implemented")
class B(A):
def go(self):