Below outlines the general git workflow I find works well in most situations/teams/projects.
Make sure master is up to date before starting a feature branch.
Using WebSockets, React and Reflux together can be a beautiful thing, but the intial setup can be a bit of a pain. The below examples attempt to offer one (arguably enjoyable) way to use these tools together.
This trifect works well if you think of things like so:
this.state
in react should instead live within stores. Stores can listen to other stores as well as to events being fired.#include "FastLED.h" | |
FASTLED_USING_NAMESPACE | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. |
import argparse, os, sys, glob | |
import cv2 | |
import torch | |
import numpy as np | |
from omegaconf import OmegaConf | |
from PIL import Image | |
from tqdm import tqdm, trange | |
from imwatermark import WatermarkEncoder | |
from itertools import islice | |
from einops import rearrange |
On Android devices, if you want to create a file input that prompts the
user to either choose an image from their photo album or take a picture with their
camera, you'll need this basically undocumented capture
attribute added to your input's accept
property:
<input type="file" accept="image/*;capture=camera" />
#include <FastLED.h> | |
// How many leds in your strip? | |
#define NUM_LEDS 4 | |
// For led chips like Neopixels, which have a data line, ground, and power, you just | |
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, | |
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN | |
#define DATA_PIN 23 | |
#define CLOCK_PIN 22 |
import { getContext, setContext } from "svelte"; | |
/** | |
* The context object. | |
*/ | |
export interface Context<T> { | |
get: () => T; | |
set: (ctx: T) => T; | |
} |
/Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml
.bzexclusions
tag:<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.
They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).
You will want to create an index.html
file and copy/paste the contents of 1-base.html
and then create a scripts.js
file and copy/paste the contents of one of the examples into it.