I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
var video = document.querySelector('video'); | |
var caption = video.querySelector('track[kind=captions]'); | |
var captionsArea = document.querySelector('.captions-area'); | |
var captionsDisplay = document.querySelector('.captions-display'); | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', caption.src); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState === 4) { |
$('#calendar').fullCalendar({ | |
viewRender: function(currentView){ | |
var minDate = moment(), | |
maxDate = moment().add(2,'weeks'); | |
// Past | |
if (minDate >= currentView.start && minDate <= currentView.end) { | |
$(".fc-prev-button").prop('disabled', true); | |
$(".fc-prev-button").addClass('fc-state-disabled'); | |
} | |
else { |
namespace NancyAndNowin | |
{ | |
using System; | |
using System.Net; | |
using System.Threading.Tasks; | |
using Nancy.Owin; | |
using Nowin; | |
public class Program | |
{ |
<!-- | |
<form autocomplete="off"> will turn off autocomplete for the form in most browsers | |
except for username/email/password fields | |
--> | |
<form autocomplete="off"> | |
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields --> | |
<input id="username" style="display:none" type="text" name="fakeusernameremembered"> | |
<input id="password" style="display:none" type="password" name="fakepasswordremembered"> | |
Function Convert-ToPackageReference | |
{ | |
Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri, | |
[String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/cdd0fb31efd70c4c0f8c86ddb314de86ab8972e8/Convert-ToPackageReference.xsl", | |
[String] $resultsFile = [System.IO.Path]::GetTempFileName() ) | |
Process { | |
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform | |
$xslt.Load( $stylesheetUri ) | |
$xslt.Transform( $inputUri, $resultsFile ) |
import React, { useState, useCallback } from "react"; | |
import { useBlurhash } from "./use-blurhash"; | |
import { useInView } from "react-intersection-observer"; | |
type Props = React.DetailedHTMLProps< | |
React.ImgHTMLAttributes<HTMLImageElement>, | |
HTMLImageElement | |
> & { blurhash?: string | null }; | |
// Uses browser-native `loading="lazy"` to lazy load images |