Skip to content

Instantly share code, notes, and snippets.

😀 now hosted on digitalocean >_<

xlui xlui

😀 now hosted on digitalocean >_<
View GitHub Profile
xlui /
Created Mar 24, 2018
GitHub Fork 之后同步上游代码

GitHub Fork 了项目之后,如果上游有更新,我们可能需要手动同步更新下来。

首先,克隆 Fork 的项目:

git clone --depth=1

然后,添加原有项目地址为 upstream:

xlui / ConfirmPassword.html
Last active Jan 3, 2018
Using jQuery to confirm password
View ConfirmPassword.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Use jQuery to Confirm Password</title>
<form id="register" class="form-register" onsubmit="register();" method="post">
<label for="username">用户名:</label>
<input id="username" type="text" placeholder="请输入用户名" required autofocus/>
xlui /
Created Nov 18, 2017
Use MongoDB in flask
#!/usr/bin/env python
# encoding: utf-8
import json
from flask import Flask, request, jsonify
from flask_mongoengine import MongoEngine
app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = {
'db': 'test',