An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
List moved
Please use https://github.com/bf4/learning to fork and pull changes.
class AppleRecord < Record | |
end |
#! /bin/bash | |
# | |
# slugify.sh by Ronan | |
# | |
# Distributed under terms of the MIT license. | |
# | |
cd photos | |
for file in *.png; do | |
filename=${file%.*} |
To remove a submodule you need to:
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
/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="*" />
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
export default { | |
name: 'department', | |
type: 'document', | |
title: 'Department', | |
fields: [ | |
{ | |
name: 'title', | |
type: 'string', | |
title: 'Title', | |
}, |
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 |