- Install Python, SQLite3 and Git locally using Hombrew and Pyenv
- Go through the getting started section of the Atlassian git docs
- Go through Learn Python the Hard Way and have them commit each exercise to git and push it to Bitbucket
- Go through Learn SQL The Hard Way
- Go through the Django Tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import os | |
import re | |
import time | |
from pathlib import Path | |
VERSION_PATTERN = r'[\d]+\.[\d]+\.[\d]+' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import shutil | |
unsplash_username = 'epicserve' | |
url_pattern = 'https://unsplash.com/napi/users/{username}/likes?page={page}&per_page=10&order_by=latest' | |
download_folder = '~/Downloads/unsplash_likes' | |
def download_image(image_url, filename): | |
# Open the url image, set stream to True, this will return the stream content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digitalocean_domain.example example.com | |
digitalocean_record.example example.com,<DO ID> | |
digitalocean_record.fd-gmail-txt example.com,<DO ID> | |
digitalocean_record.fd-mx["alt1.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["alt2.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx2.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx3.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-ns["1"] example.com,<DO ID> | |
digitalocean_record.fd-ns["2"] example.com,<DO ID> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from oauthlib.oauth2 import BackendApplicationClient | |
from requests_oauthlib import OAuth2Session | |
""" | |
In order to use this class you're have to setup an API token first by going to https://bitbucket.org/account/user/oeie/api. | |
And then add an OAuth consumer. Please note this will not work if you don't provide Callback URL when creating your | |
consumer. I just provided a generic URL since we don't need callbacks. The documentation for the bitbucket API is | |
located here, https://developer.atlassian.com/bitbucket/api/2/reference/. | |
Example usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from oauthlib.oauth2 import BackendApplicationClient | |
from requests_oauthlib import OAuth2Session | |
client_id = os.environ['BITBUCKET_KEY'] | |
client_secret = os.environ['BITBUCKET_SECRET'] | |
username = os.environ['BITBUCKET_USERNAME'] | |
password = os.environ['BITBUCKET_PASSWORD'] | |
token_url = 'https://bitbucket.org/site/oauth2/access_token' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.* | |
!.coveragerc | |
!.env | |
!.pylintrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Thing(name) { | |
this.thing = name; | |
} | |
Thing.prototype = { | |
get_thing: function() { | |
return this.thing; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
windows: | |
- name: pears | |
root: ~/Sites/oeie/pears | |
layout: main-vertical | |
panes: | |
- workon pears | |
- workon pears && ./manage.py rqworker default low | |
- workon pears && ./manage.py runserver | |
- gulp |
NewerOlder