List moved
Please use https://github.com/bf4/learning to fork and pull changes.
import {useEffect} from 'react' | |
import config from 'config:sanity' | |
const BUNDLE_CHECK_INTERVAL = 15 * 1000 | |
async function getCurrentHash() { | |
const basePath = (config.project && config.project.basePath) || '/' | |
const html = await fetch(basePath).then((res) => res.text()) | |
const [, hash] = html.match(/app\.bundle\.js\?(\w+)/) || [] | |
return hash |
#! /bin/bash | |
# | |
# slugify.sh by Ronan | |
# | |
# Distributed under terms of the MIT license. | |
# | |
cd photos | |
for file in *.png; do | |
filename=${file%.*} |
List moved
Please use https://github.com/bf4/learning to fork and pull changes.
Similar to useState
but with some lightweight behind-the-scenes
writing to localStorage; also subscribes to changes in localStorage
to allow for cross-tab changes to sync automatically.
The first argument is the name of the local storage property/key you want to control with this hook. The second argument,
options
, really just has one available directive: bool
. Setting bool
to true
has the effect of evaluating the data
class AppleRecord < Record | |
end |
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
/** | |
* This script injects JSDoc comments from the JS source files into the type | |
* definition files. This is necessary because the type definition files | |
* generated by TypeScript do not include JSDoc comments. | |
* | |
* @see https://github.com/microsoft/TypeScript/issues/14619 | |
* | |
* The strategy is a bit hacky, but straightforward: | |
* | |
* 1. Recursively walk the output folder looking for .d.ts files |
/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="*" />
export default { | |
name: 'department', | |
type: 'document', | |
title: 'Department', | |
fields: [ | |
{ | |
name: 'title', | |
type: 'string', | |
title: 'Title', | |
}, |
To remove a submodule you need to: