Skip to content

Instantly share code, notes, and snippets.

View sergiokopplin's full-sized avatar
🌍
Working from home

Sérgio A. Kopplin sergiokopplin

🌍
Working from home
View GitHub Profile
@sergiokopplin
sergiokopplin / ducky.md
Created April 7, 2021 12:15 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

/* eslint-disable @typescript-eslint/no-explicit-any */
const JOB_GUARDS = {
CAN_NOT_RETRY: 'canNotRetry',
SHOULD_RETRY: 'shouldRetry',
DONE_RETRY: 'doneRetry',
};
const jobGuards = {
[JOB_GUARDS.CAN_NOT_RETRY]: ({ maxRetries, retries, status }) =>
@sergiokopplin
sergiokopplin / machine.js
Last active July 28, 2020 17:54
Generated by XState Viz: https://xstate.js.org/viz
const importerJobMachine = Machine(
{
id: 'importerJob',
initial: 'idle',
context: {
data: {
status: {},
command: {},
report: {},
},
@sergiokopplin
sergiokopplin / machine.js
Last active July 28, 2020 13:51
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'importer',
initial: 'idle',
states: {
idle: {
on: {
start: 'registration',
},
},
registration: {
@sergiokopplin
sergiokopplin / machine.js
Last active July 28, 2020 02:17
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'importer',
initial: 'idle',
states: {
idle: {
on: {
start: 'registration',
},
},
registration: {
@sergiokopplin
sergiokopplin / index.html
Created June 7, 2016 21:11
don't delete. (:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Just a Test!</title>
</head>
<body>
<h1>Working!</h1>
</body>
</html>