You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to allow the file picker AND camera capture on Android
Allow photo album AND the camera
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:
Using an ESP32-C3 connected to HomeAssistant via ESPHome, control 12v yard path lights including configuring automations to turn lights on/off at sunset/sunrise and dimming.
This short guide will show you how to use HomeAssistant, and the ESPHome app for it, to control LED dimming. In this case I'm using this for low voltage yard path lights, but could be used for anything.
If you have HomeKit integrated with HomeAssistant than you can also control/dim your LEDs from your iPhone!
templ is a great view framework but there is no clear documentation (as of writing) showing how to use it with the Echo web framework. This short guide should show you how to set it up:
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.
Overview
This trifect works well if you think of things like so:
Reflux Store: The store fetches, updates and persists data. A store can be a list of items or a single item. Most of the times you reach for this.state in react should instead live within stores. Stores can listen to other stores as well as to events being fired.
Reflux Actions: Actions are triggered by components when the component wants to change the state of the store. A store listens to actions and can listen to more than one set of actions.
Deploying CloudFlare Workers via CloudFlare Pages in a Turborepo monorepo
Deploying Cloudflare Workers via Cloudflare Pages in a Turborepo monorepo
Whew, what a mouthful.
Cloudflare Workers is an excellent platform for deploying a variety of applications but it has some limitations compared to Cloudflare's other product, Pages.
Pages gives you git integration which gives you auto-deploying via git push as well as pull request preview deployment links so you can test out features before pushing to production.
However, it's not super clear how to deploy a bare worker to Cloudflare Pages as Pages is more tailored right now for apps (SvelteKit, Astro, Next, etc), that is why I wrote up this little guide.
For a project I'm working on, I need to ship a single server binary with all
static files embedded and use that for the frontend of the server. The backend
has a variety of routes which the frontend calls.
The frontend is a SvelteKit static app built to ./frontend/build. Here is the
Echo configuration to get these files serving at the root of the web server:
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).
Usage
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.
Create a Go app release for every git version tag using Github Actions
Release golang apps using Github Actions
Want to release a new binary on Github for every new git tag (e.g. v1.2.7)? Here is a simple Github Actions yaml config file that should get you started.
This script will automatically checkout your code, setup the correct version of go as defined in your go.mod file
and build your go binary (in this case using a Makefile default target), then upload it to a new Github Release.
# .github/workflows/release.ymlname: Build and release Go Project