Skip to content

Instantly share code, notes, and snippets.

View xlui's full-sized avatar
🎯
Focusing

xlui xlui

🎯
Focusing
View GitHub Profile
@xlui
xlui / sync.md
Created March 24, 2018 11:08
GitHub Fork 之后同步上游代码

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

首先,克隆 Fork 的项目:

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

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

@xlui
xlui / ConfirmPassword.html
Last active January 3, 2018 07:27
Using jQuery to confirm password
<!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 November 18, 2017 07:57
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',