Clone Mastodon's repository.
# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live
cd ~/live
use futures::StreamExt; | |
use std::{ | |
thread::{self}, | |
time::Duration, | |
}; | |
async fn do_work(idx: u32) { | |
thread::sleep(Duration::from_millis(500)); | |
dbg!(idx); | |
} |
# instal dependencies | |
sudo apt install wireguard git dh-autoreconf libglib2.0-dev intltool build-essential libgtk-3-dev libnma-dev libsecret-1-dev network-manager-dev resolvconf | |
# clone repo and build | |
git clone https://github.com/max-moser/network-manager-wireguard | |
cd network-manager-wireguard | |
./autogen.sh --without-libnm-glib | |
./configure --without-libnm-glib --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/NetworkManager --localstatedir=/var |
I hereby claim:
To claim this, I am signing this object:
Picked these from here
Command | Note |
---|---|
Ctrl + a | go to the start of the command line |
Ctrl + e | go to the end of the command line |
Ctrl + k | delete from cursor to the end of the command line |
@app.route('/path', methods=['GET', 'POST']) | |
def page(): | |
visible = 'none' | |
# to make the section hide or | |
visible = 'true' | |
# to be displayed | |
# then you can choose wheter or not show it, just changing the value of "visible" | |
return render_template('template.html', visible=visible) |
<div class="..." style="display: {{ visible }};"> | |
<p> | |
<!-- ... --> | |
</p> | |
</div> |
from werkzeug.datastructures import MultiDict | |
from flaskext.wtf import FlaskForm, StringField, #.... | |
class ContactForm(FlaskForm): | |
email = StringField('Email', [DataRequired(), Email()]) | |
# ... | |
submit = SubmitField('Submit') | |
def reset(self): |
@app.route('/', methods=['GET', 'POST']) | |
def index(): | |
form = ContactForm() | |
if form.validate_on_submit(): | |
# ... do whatever you need | |
form.reset() | |
# ... | |
return render_template('index.html', form=form) |