Skip to content

Instantly share code, notes, and snippets.

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

Lokesh Pahal lokeshpahal

🏠
Working from home
  • Code Genesys
  • Delhi
View GitHub Profile
@btroncone
btroncone / rxjs_operators_by_example.md
Last active September 14, 2025 16:48
RxJS 5 Operators By Example
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active August 22, 2025 13:17
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@jacob414
jacob414 / fake_django_req.py
Created November 14, 2011 11:02
Fake a Django HTTP request for simpler testing purposes
from StringIO import StringIO
from django.core.handlers.wsgi import WSGIRequest
def fake_get(path='/', user=None):
req = WSGIRequest({
'REQUEST_METHOD': 'GET',
'PATH_INFO': path,
'wsgi.input': StringIO()})
from django.contrib.auth.models import AnonymousUser
req.user = AnonymousUser() if user is None else user