Hexagonal world map, that draws based hexagons on the generated canvas map (comment out display: hidden
, in css, to see the canvas rendering)
Reference sources:
- Rendering a map as canvas
- Hexbin Heightmap based from Heightmap
export const onRequest = [ | |
async function cache({ request, next, waitUntil, }) { | |
if (request.method === "GET") { | |
const cache = caches.default; | |
const cachedResponse = await cache.match(request); | |
if (cachedResponse) { | |
console.log("cache HIT", request.url); | |
return cachedResponse; | |
} | |
} |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
$DateTimeNow = Get-Date | |
$DateTimeMorning = Get-Date -Hour 7 -Minute 0 | |
$DateTimeNight = Get-Date -Hour 22 -Minute 0 | |
| |
# 07:00 < now < 22:00 | |
| |
if ($DateTimeNow.TimeOfDay -gt $DateTimeMorning.TimeOfDay -and $DateTimeNow.TimeOfDay -lt $DateTimeNight.TimeOfDay) { | |
powercfg.exe /S SCHEME_MIN | |
} else { | |
powercfg.exe /S SCHEME_BALANCED |
const initial = undefined | |
const context = undefined | |
const machine = Machine( | |
{ | |
id: 'service-request', | |
initial: initial || 'REQUESTED', | |
context: { | |
hasPayment: true, | |
hasApproval: true, |
const serviceRequestMachine = Machine({ | |
id: 'service-request', | |
initial: 'service', | |
context: { | |
hasTerms: false, | |
hasQuantity: true, | |
quantity: 1, | |
terms: false, | |
}, | |
states: { |
const lightMachine = Machine({ | |
id: 'gvg', | |
type: 'parallel', | |
states: { | |
art: { | |
initial: 'green', | |
states: { | |
green: { | |
after: { | |
2000: 'red', |
#!/bin/bash | |
# usage: ./git-clean PATH TRASH_FOLDER | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
function github_url { | |
echo "https://`git config --get remote.origin.url | sed -e "s/git@//" -e "s/:/\//" -e s"/\.git//"`" |
/* | |
* Ecouter France Inter à la bonne heure | |
* https://www.franceinter.fr/programmes | |
* | |
*/ | |
var emissions = $('.rich-section-list-gdp-item:not(.step)').map(function () { | |
var date = new Date($(this).attr('data-start-time') * 1000); | |
var emission = { | |
hours: (date.getHours() + 9) % 24, |
Hexagonal world map, that draws based hexagons on the generated canvas map (comment out display: hidden
, in css, to see the canvas rendering)
Reference sources:
class Root extends React.Component { | |
render() { | |
const repos = this.props.response.data; | |
return ( | |
<div>{repos.map(function(repo) { return <p>{repo.name}</p>; })}</div> | |
); | |
} | |
} | |
function connect(url, component) { |