Skip to content

Instantly share code, notes, and snippets.

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

Sudipto Das coderdipto

🏠
Working from home
  • Dhaka, Bangladesh
View GitHub Profile
# First, install all of the things
sudo su
apt-get update
apt-get install nginx
/etc/init.d/nginx start
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
@coderdipto
coderdipto / temporary-email-address-domains
Created April 27, 2020 06:37 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@coderdipto
coderdipto / write_restricted_model_serializer.py
Created June 18, 2020 06:11 — forked from Kobold/write_restricted_model_serializer.py
A default read-only serializer for django-rest-framework as of DRF 2.4.
class RestrictedSerializerOptions(serializers.ModelSerializerOptions):
"""
Meta class options for ModelSerializer
"""
def __init__(self, meta):
super(RestrictedSerializerOptions, self).__init__(meta)
self.writable_fields = getattr(meta, 'writable_fields', ())
class WriteRestrictedModelSerializer(serializers.ModelSerializer):
@coderdipto
coderdipto / swap.sh
Created September 8, 2020 08:03 — forked from Whistler092/swap.sh
swap
sudo swapon -s
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
@coderdipto
coderdipto / swap.sh
Last active January 20, 2022 05:10 — forked from Whistler092/swap.sh
Swap
sudo swapon -s
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
@coderdipto
coderdipto / geodjango_macOS_arm64.md
Created November 28, 2021 20:19 — forked from codingjoe/geodjango_macOS_arm64.md
HowTo run GeoDjango and PostGIS on M1 macOS arm64 MacBook
  1. Install PostgreSQL with PostGIS via Postges.app
  2. Install brew as recommended.
  3. Install dependencies:
    brew install geos gdal
    
  4. Add the following to your settings:
    # settings.py
    

GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')

Install Go (v1.16beta) on Apple Silicon, use with Homebrew

Go is not available to install via Homebrew at the time of this writing. (Dec 18th 2020)

Go v1.16 will ship with Apple Silicon support in February of 2021, however the Go 1.16 beta can be installed from the Go website and can be linked to brew so that other brew packages that depend on Go may use it.

  1. Install go1.16beta1.darwin-arm64.pkg.
  2. Run mkdir /opt/homebrew/Cellar/go
  3. Create a symlink to the Go v1.16 pkg installation with ln -s /usr/local/go /opt/homebrew/Cellar/go/1.16
  4. Run brew link go
@coderdipto
coderdipto / multiple_ssh_setting.md
Created November 9, 2022 14:11 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"