Skip to content

Instantly share code, notes, and snippets.

joker sponia-joker

Block or report user

Report or block sponia-joker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sponia-joker
sponia-joker / gist:d773f007b845bd865b330a2a8174213e
Created Mar 8, 2019 — forked from dhbradshaw/gist:e2bdeb502b0d0d2acced
Rename field using migrations in django 1.7
View gist:d773f007b845bd865b330a2a8174213e
To change a field name in django 1.7+
1. Edit the field name in the model (but remember the old field name: you need it for step 3!)
2. Create an empty migration
$ python manage.py makemigrations --empty myApp
3. Edit the empty migration (it's in the migrations folder in your app folder, and will be the most recent migration) by adding
migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'),
to the operations list.
@sponia-joker
sponia-joker / npm.taobao.sh
Created Dec 28, 2017 — forked from 52cik/npm.taobao.sh
npm 淘宝镜像配置
View npm.taobao.sh
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set chromedriver_cdnurl http://cdn.npm.taobao.org/dist/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl http://cdn.npm.taobao.org/dist/operadriver # operadriver 二进制包镜像
npm set phantomjs_cdnurl http://cdn.npm.taobao.org/dist/phantomjs # phantomjs 二进制包镜像
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass # node-sass 二进制包镜像
npm set electron_mirror http://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
@sponia-joker
sponia-joker / introrx.md
Created Dec 21, 2017 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.