Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
xlui.app now hosted on digitalocean >_<

xlui xlui

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

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

首先,克隆 Fork 的项目:

git clone git@github.com:FORK_USERNAME/FORK_REPO.git --depth=1
cd FORKREPO

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

@xlui
xlui / ConfirmPassword.html
Last active Jan 3, 2018
Using jQuery to confirm password
View ConfirmPassword.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Use jQuery to Confirm Password</title>
</head>
<body>
<form id="register" class="form-register" onsubmit="register();" method="post">
<label for="username">用户名:</label>
<input id="username" type="text" placeholder="请输入用户名" required autofocus/>
@xlui
xlui / flask_mongo.py
Created Nov 18, 2017
Use MongoDB in flask
View flask_mongo.py
#!/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',