As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
# -*- coding: utf-8 -*- | |
import asyncio | |
import re | |
import asyncio_redis | |
import tornado.concurrent | |
import tornado.httpclient | |
import tornado.web | |
import tornado.platform.asyncio |
.PHONY: clean distclean install run | |
ENV ?= env | |
VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));") | |
ifeq ($(VENV),1) | |
GUNICORN = gunicorn | |
else | |
GUNICORN = $(ENV)/bin/gunicorn | |
endif |
# from .celery import app | |
import heapq | |
import socket | |
from collections import UserDict | |
from functools import singledispatch, update_wrapper | |
from operator import itemgetter | |
from select import poll, POLLIN | |
from urllib.parse import urlparse | |
import httplib2 |
# coding=utf-8 | |
# Note: | |
# 1. 使用Redis缓存用户信息,减少重复调用 | |
# 2. 只通过用户的location字段看是否包含beijing、shanghai、guangzhou、 | |
# shenzhen、china这几个关键词判断是否是国人 | |
from collections import defaultdict | |
import redis | |
import requests | |
USENAME = '<YOUR USERNSME>' |
Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"
This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).
I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)
Main features:
license: gpl-3.0 | |
border: no |
# coding=utf-8 | |
# pip install zhihu_oauth python-dateutil | |
import os | |
import re | |
from datetime import datetime | |
from collections import defaultdict | |
import dateutil.parser | |
from zhihu_oauth import ZhihuClient |