Skip to content

Instantly share code, notes, and snippets.

View barelyhuman's full-sized avatar

Siddharth Gelera (reaper) barelyhuman

View GitHub Profile
@barelyhuman
barelyhuman / extensions.json
Last active April 26, 2024 08:32
Simple but Minimal
[
{
"id": "a-h.templ",
"name": "templ",
"publisher": "a-h",
"version": "0.0.24"
},
{
"id": "adpyke.codesnap",
"name": "codesnap",
@barelyhuman
barelyhuman / preact-missing.md
Last active March 13, 2024 22:08
Preact Ecosystem, missing list

But does Preact has/supports/can do this?

Comment down things you think React has and preact doesn't and we'll have a definitive list of things that people think preact lacks and things that need to be worked on.

You can follow the Public Board

Docker Deploy

Simple setup to use SSH as the way to transfer the docker image instead of using a registry

  • Certificate Management
  • Upload Inconsistencies
@barelyhuman
barelyhuman / *pipe.md
Last active November 12, 2023 23:26
pipe

Ever changing implementations of pipes that I reimplement in each codebase for different use cases.

If you do want a package instead. You should go with this https://github.com/barelyhuman/pipe

@barelyhuman
barelyhuman / zoned-date-fns.js
Last active November 3, 2023 08:28
zoned date-fns-utils
// import { addDays, subDays } from 'npm:date-fns'; // uncomment for deno
import {addDays,subDays} from "date-fns"
const getCurrentZone = () => Intl?.DateTimeFormat()?.resolvedOptions().timeZone
export function getZonedWeekday(date, zone = getCurrentZone()) {
const weekdayString = new Date(date).toLocaleString('en-GB', {
timeZone: zone,
weekday: 'long',
@barelyhuman
barelyhuman / vscode-minimal.json
Last active October 4, 2023 09:33
vscode-minimal.json
{
"editor.quickSuggestionsDelay": 1000,
"editor.suggestOnTriggerCharacters": false,
"editor.lightbulb.enabled": false,
"editor.selectionHighlight": true,
"editor.occurrencesHighlight": true,
"editor.formatOnSave": true,
"editor.fontFamily": "Hermit",
"editor.fontSize": 13.5,
"editor.formatOnPaste": false,
@barelyhuman
barelyhuman / *store.md
Last active September 29, 2023 22:02
simple callback based store

store

Simple store to write code based on value changes

const s = store({ data: 1 });

s.onChange((v) => {
 console.log({ v });
@barelyhuman
barelyhuman / setup.sh
Last active September 9, 2023 18:56
Setup NGINX + CGIT on a Ubuntu 20.04
#!/bin/bash
set -euxo pipefail
# Configurations
# the new user that's to be added for logging in (comment out `create_user` from the `main` if you already have a admin user)
NEW_USER="admin"
DUMMY_PASS="dummyPassword123"
# your public key to be replaced here
@barelyhuman
barelyhuman / *apex.md
Created August 13, 2023 11:10
Wrapper around react to write Vue options like components

It's loosely inspired by Vue options and takes the separation of concerns a bit more seriously. It is decently typed to satify the basic DX, if you've got improvements, please let me know.

Usage

The snippet depends on

  • lodash.isequal
  • @vue/reactivity
npm i lodash.isequal @vue/reactivity