import NextAuth from "next-auth/next"; | |
function CognitoProvider(options) { | |
return { | |
id: "cognito", | |
name: "Cognito", | |
type: "oauth", | |
wellKnown: `${options.issuer}/.well-known/openid-configuration`, | |
idToken: true, | |
profile(profile) { |
You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:
var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }
console.log(getN()); // 5
setN(10);
#README:
This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm
##Installation:
You need:
- yad (at least 0.26) (AUR)
global !p | |
import string, vim | |
import textwrap | |
_snips_fns = {} | |
def py(*args): | |
import re | |
old_a = vim.eval('@a') |
// Disable bold. | |
term_.prefs_.set('enable-bold', false) | |
// Use this for Solarized Dark | |
term_.prefs_.set('background-color', "#002b36"); | |
term_.prefs_.set('foreground-color', "#839496"); | |
term_.prefs_.set('color-palette-overrides', [ | |
'#073642', | |
'#dc322f', |
- Avoid too many reflows (the browser to recalculate everything)
- Use advanced CSS3 for graphic card rendering
- Precalculate sizes and positions
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
// Vimperator plugin: 'Cooperation LDRize Mappings' | |
// Version: 0.25 | |
// Last Change: 09-Jun-2011. Jan 2008 | |
// License: Creative Commons | |
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid | |
// | |
// Cooperation LDRize Mappings for Vimperator | |
// | |
// Variables: | |
// g:ldrc_captureMapping |