A Pen by Andreas Borgen on CodePen.
/** | |
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts. | |
* | |
* Note that this uses an older fork of stable-diffusion | |
* with the 'txt2img.py' script, and that script was modified to | |
* support the --outfile command. | |
*/ | |
var { spawn, exec } = require("child_process"); | |
var path = require("path"); |
1. Check that your Raspberry Pi actually has a WiFi Module built in :-) | |
2. Check your wpa_supplicant.conf File in /boot directory (Here's an example file: https://gist.github.com/alexabruck/16e3f04ae1d9c883bf5b1f1b5c9d08b2) | |
- formatting (no whitespace around the equal signs)? | |
- country code correct? | |
- typos? | |
- windows line endings are problematic | |
3. Check your Router settings | |
- Is a MAC Filter active? | |
- 2.4GHz or 5GHz? Raspberry Pi Zero will only work with 2.4GHz | |
- Is the SSID hidden? If yes, then you need to add scan_ssid=1 to the network settings in wpa_supplicant.conf File |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
**Jeff Escalante** | |
# Dato & Contentful | |
There are many areas in which I'd consider Dato to be much stronger of a CMS than | |
contentful, and one in which I'd consider the opposite to be the case. I will try to be as | |
balanced as possible with this overview, as I am not employed by dato or anything ‐ my | |
goal is to ensure that my clients and developers get the best possible experience working | |
with a CMS. |
const { join } = require('path'); | |
const { readdirSync, renameSync } = require('fs'); | |
const [dir, search, replace] = process.argv.slice(2); | |
const match = RegExp(search, 'g'); | |
const files = readdirSync(dir); | |
files | |
.filter(file => file.match(match)) | |
.forEach(file => { | |
const filePath = join(dir, file); |
The real time chart is a resuable Javascript component that accepts real time data. The purpose is to show the arrival time of real time events (or lack thereof), piped to the browser (for example via Websockets). Various attributes of each event can be articulated using size, color and opacity of the object generated for the event.
The component allows multiple asynchronous data streams to be viewed, each in a horizontal band across the SVG. New data streams can be added dynamically (as they are discovered by the caller over time), simply by calling the yDomain
method with the new array of data series names. The chart will automatically fit the new data series into the available space in the SVG.
The chart's time domain is moving with the passage of time. That means that any data placed in the chart eventually will age out and leave the chart. Currently, the chart history is capped at five minutes (but can be changed by modifying the comp
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
#!/usr/bin/env python | |
from __future__ import print_function, division | |
import argparse | |
import json | |
import sys | |
from gzip import GzipFile | |
def concat_claims(claims): | |
for rel_id, rel_claims in claims.iteritems(): |