Tutorial: https://www.youtube.com/watch?v=hIqMrPTeGTc
Paste the below code in your browser console (F12 > Console):
(()=>{
markAllVideosAsNotBeingInteresting({
iterations: 1
});
})();
Tutorial: https://www.youtube.com/watch?v=hIqMrPTeGTc
Paste the below code in your browser console (F12 > Console):
(()=>{
markAllVideosAsNotBeingInteresting({
iterations: 1
});
})();
version: '3' | |
services: | |
traefik: | |
container_name: traefik | |
image: traefik:v2.0 | |
command: | |
- "--api.insecure=true" | |
- "--providers.docker=true" |
#Accept the VMware End User License Agreement | |
vmaccepteula | |
# clear paritions and install | |
clearpart --firstdisk --overwritevmfs | |
install --firstdisk --overwritevmfs --novmfsondisk | |
#set the root password | |
rootpw VMw@re1 |
TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.
If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)
A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/
The reason to avoid JWTs comes down to a couple different points:
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
# this ansible/jinja2 filter plugin allows you to use passlib's *_crypt functions | |
# until ansible 2.0 comes out - see https://github.com/ansible/ansible/issues/11244. | |
# | |
# this filter depends on passlib being installed: | |
# $ pip install passlib | |
# | |
# put this into your playbook's `filter_plugins` folder. | |
# | |
# usage example: | |
# - name: create user |
/** | |
* Actively wait for an element to disappear either by becoming | |
* invisible or by not being present. Wait up to specTimeoutMs | |
* ignoring useless webdriver errors like StaleElementError. | |
* | |
* Usage: | |
* Add `require('./waitAbsent.js');` in your onPrepare block or file. | |
* | |
* @example | |
* expect($('.some-html-class').waitAbsent()).toBeTruthy(); |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2014 Cilyan Olowen <[email protected]> | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# Demo application showing how once can combine the python | |
# threading module with GObject signals to make a simple thread | |
# manager class which can be used to stop horrible blocking GUIs. | |
# | |
# (c) 2008, John Stowers <[email protected]> | |
# | |
# This program serves as an example, and can be freely used, copied, derived | |
# and redistributed by anyone. No warranty is implied or given. | |
import gtk | |
import gobject |