Skip to content

Instantly share code, notes, and snippets.

View sethhorsley's full-sized avatar
🦾
who knows

Seth Horsley sethhorsley

🦾
who knows
View GitHub Profile

Large Header Style Animation on Android

Code

import { Text, View } from "react-native";
import Animated, {
  Extrapolation,
  interpolate,
  useAnimatedScrollHandler,
  useAnimatedStyle,
  useSharedValue,
@PhracturedBlue
PhracturedBlue / ecoworthy.md
Last active August 22, 2026 23:17
Ecoworthy 50V server battery Modbus-RTU protocol

Info related to Eco Worthy JBD UP16S010

BMS: JBD UP16S010 Decoding based on firmware version 13.2.4

Commands can be sent via the RS485-1 port or by te RS232 port (9600baud, N81)

CRC calculation: crc16 with initial_value=0xffff and polynomial=0xa001, LSB 1st

The Modbus data-frames are generally MSB-1st except for the CRC. The CRC is calculated from the entire frame (minus the crc itself)

@Wowfunhappy
Wowfunhappy / main.m
Last active February 19, 2026 17:50
Firefox Key Equivalent Fixer
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import "ZKSwizzle.h"
@interface myNSApplication : NSApplication
@end
@AliOsm
AliOsm / .env
Last active December 17, 2025 14:13
Deploy Rails, GoodJob, PostgreSQL, Redis, Memcached, Meilisearch, and ChromaDB on the same server using Kamal.
KAMAL_REGISTRY_PASSWORD=dckr_pat_xXXxx_x0xXxXx-xX-XXX0xX0x-x
RAILS_MASTER_KEY=00x00xxx000xxx000000xx0x000x0x00
POSTGRES_PASSWORD=xXxxx0xXXx0
MEILI_MASTER_KEY=xXxxx0xXXx0
BLAZER_DATABASE_URL=postgres://service:{POSTGRES_PASSWORD}@service-name-postgres:5432/service_production
@davidlormor
davidlormor / example_resource.rb
Last active February 4, 2026 04:46
Avo resource view helpers
# frozen_string_literal: true
class ExampleResource < Avo::BaseResource
include ResourceExtensions
field :id, as: :id
field :name, as: :text
index do
field :some_field, as: :text
@kiwirm
kiwirm / .skhdrc
Last active May 2, 2024 14:16 — forked from pkazmier/.skhdrc
# Updated from https://gist.github.com/pkazmier to support yabai
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@baiwfg2
baiwfg2 / it-ebooks.md
Last active November 11, 2026 01:11
Download ebooks as you want
@torchhound
torchhound / index.js
Created November 1, 2018 01:08
mongo-crud index.js
const express = require('express')
const bodyParser = require('body-parser')
const MongoClient = require('mongodb').MongoClient
const dbName = process.env.NODE_ENV === 'dev' ? 'database-test' : 'database'
const url = `mongodb://${process.env.MONGO_INITDB_ROOT_USERNAME}:${process.env.MONGO_INITDB_ROOT_PASSWORD}@${dbName}:27017?authMechanism=SCRAM-SHA-1&authSource=admin`
const options = {
useNewUrlParser: true,
reconnectTries: 60,
reconnectInterval: 1000
@pkazmier
pkazmier / .skhdrc
Last active January 19, 2025 02:23
# Modified from https://github.com/alyssais configuration.
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.