Skip to content

Instantly share code, notes, and snippets.

View syeo66's full-sized avatar

Red Ochsenbein syeo66

View GitHub Profile
[INFO][2023-04-13 14:58:04] .../vim/lsp/rpc.lua:662 "Starting RPC client" { args = { "--stdio" }, cmd = "vscode-eslint-language-server", extra = { cwd = "/home/red/abf/timbra" }}
[DEBUG][2023-04-13 14:58:04] .../vim/lsp/rpc.lua:387 "rpc.receive" { id = 1, jsonrpc = "2.0", result = { capabilities = { codeActionProvider = { codeActionKinds = { "quickfix", "source.fixAll.eslint" } }, executeCommandProvider = { commands = { "eslint.applySingleFix", "eslint.applySuggestion", "eslint.applySameFixes", "eslint.applyAllFixes", "eslint.applyDisableLine", "eslint.applyDisableFile", "eslint.openRuleDoc" } }, textDocumentSync = { change = 2, openClose = true, save = { includeText = false }, willSaveWaitUntil = false }, workspace = { workspaceFolders = { supported = true } } } }}
[INFO][2023-04-13 14:58:04] .../lua/vim/lsp.lua:1345 "LSP[eslint]" "server_capabilities" { server_capabiliti
import { format } from 'date-fns'
import React, { memo, useEffect, useState } from 'react'
import styled from 'styled-components'
import { AnalogClockConfigType } from './ClockType'
const TIMER_PRECISION = 250
interface AnalogClockProps {
config: AnalogClockConfigType
@syeo66
syeo66 / gist:6f012d819ae218070fd1e7f0b9968fde
Created November 20, 2021 12:20
self.id verification
did:3:kjzl6cwe1jw14bg0df6fnhf4uf8v3vg2qa10ovxq74qqb0fflt89g0xt2wb5oak
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreid2ea6xnxe4rk7hj43nlmsh7yjbozvu3cldsimogxtra7drcn3wby ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@syeo66
syeo66 / encode-map.js
Created May 11, 2019 07:00
...now a bit more concise
const encode = data => data.split('').map(c => c.toUpperCase());
@syeo66
syeo66 / encode-array.js
Last active May 11, 2019 06:59
using map to fill an array
const encode = data => {
const encoded = [];
data.split('').map(c => encoded.push(c.toUpperCase()));
return encoded;
}
@syeo66
syeo66 / useState-ehm-nope.js
Created May 2, 2019 09:34
Creating useState() - I'm soooooo clever
const useState = (initValue) => {
let state = initValue;
const setState = (newState) => {
if (typeof newState === 'function') {
state = newState(state);
return;
}
state = newState;
}
const [counter, setCounter] = useState(0);
const handleClick = () => {
setCounter(prevCounter => prevCounter + 1);
setCounter(prevCounter => prevCounter + 1);
}
console.log(counter);
@syeo66
syeo66 / state-counter-2.js
Created April 25, 2019 05:43
Add 2 to the counter... the wrong way
const [counter, setCounter] = useState(0);
const handleClick = () => {
setCounter(counter + 1);
setCounter(counter + 1);
}
console.log(counter);
@syeo66
syeo66 / state-counter-1.js
Created April 25, 2019 05:35
A small snippet of a counter using useState()
const [counter, setCounter] = useState(0);
const handleClick = () => setCounter(counter + 1);
console.log(counter);