-
Introduction to D1
D1 is Cloudflare’s SQLite-compatible database that is perfect for serverless environments like Cloudflare Workers. It brings SQL to the edge, enabling performant and durable queries. -
Setting Up D1 in Your Project
Explain how to set up D1 by creating a new Cloudflare project and connecting D1. You can follow this process:
I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before and after service. I just include this in my /etc/nixos/configuration.nix file and nixos-rebuild; then a systemctl suspend or a close of the lid will cause the hibernate timer to be set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CheckBoxBootstrapSwitch(CheckboxInput): | |
| """Django widget for bootstrap switch HTML widget: http://www.bootstrap-switch.org/ | |
| Options can be provided through 'switch' argument: | |
| switch = forms.BooleanField(required=False, label=_(u"bootstrap switch"), | |
| widget=CheckBoxBootstrapSwitch(switch={'size': 'small', 'on': 'warning', 'text-label': 'Switch Me'})) | |
| """ | |
| def __init__(self, switch=None, *args, **kwargs): | |
| self.switch = switch or {} | |
| super(CheckBoxBootstrapSwitch, self).__init__(*args, **kwargs) |