Github will be the main account and bitbucket the secondary.
ssh-keygen -t rsa -C "github email"
Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.
| from django.db import models | |
| from django.contrib.auth.models import User | |
| class Profile(models.Model): | |
| user = models.OneToOneField(User, on_delete=models.CASCADE) | |
| bio = models.TextField(max_length=500, blank=True) | |
| location = models.CharField(max_length=30, blank=True) | |
| birth_date = models.DateField(null=True, blank=True) | |
| /** | |
| * setup JQuery's AJAX methods to setup CSRF token in the request before sending it off. | |
| * http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request | |
| */ | |
| function getCookie(name) | |
| { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); |
| from django.db import models | |
| from django.utils import timezone | |
| class Bank(models.Model): | |
| bank_ifsc = models.CharField(max_length=200, blank=False, primary_key=True) | |
| bank_name = models.CharField(max_length=200, blank=False) | |
| bank_addr = models.CharField(max_length=400, blank=True) | |
| def __str__(self): |
| mkdir tutorial | |
| cd tutorial | |
| # Create a virtualenv to isolate our package dependencies locally | |
| virtualenv env | |
| source env/bin/activate # On Windows use `env\Scripts\activate` | |
| # Install Django and Django REST framework into the virtualenv | |
| pip install django | |
| pip install djangorestframework |
| <!doctype html> | |
| <head> | |
| <title>Stripe OAuth Example</title> | |
| </head> | |
| <body> | |
| {{ token }} | |
| </body> | |
| </html> |
| <?php | |
| define('CLIENT_ID', 'YOUR_CLIENT_ID'); | |
| define('API_KEY', 'YOUR_API_KEY'); | |
| define('TOKEN_URI', 'https://connect.stripe.com/oauth/token'); | |
| define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize'); | |
| if (isset($_GET['code'])) { // Redirect w/ code | |
| $code = $_GET['code']; |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = pavan.sss1991@gmail.com | |
| username = pksunkara | |
| [core] | |
| editor = vim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| excludesfile = ~/.gitignore | |
| [sendemail] | |
| smtpencryption = tls |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |