Skip to content

Instantly share code, notes, and snippets.

View jtomchak's full-sized avatar
🐋
Chippin' away at it

Jesse Tomchak jtomchak

🐋
Chippin' away at it
View GitHub Profile
import React, { useEffect, useRef, useState } from "react";
import { AppState } from "react-native";
/**
* Returns 'inactive | active | background'
*/
export const useAppState = () => {
const appState = useRef(AppState.currentState);
const [appStateVisible, setAppStateVisible] = useState(appState.current);
@jtomchak
jtomchak / server.ts
Last active February 21, 2024 20:41
RedwoodJS v7 Server Config with BullMQ & BullBoard
import { createBullBoard } from '@bull-board/api'
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'
import { FastifyAdapter } from '@bull-board/fastify'
import { createServer } from '@redwoodjs/api-server'
import { logger } from 'src/lib/logger'
// (↓) Enable bullMQ worker processing
import 'src/queue/worker'
@jtomchak
jtomchak / Subscriptions.opml
Last active February 11, 2024 14:08
RSS Subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>RSS subscriptions for [email protected]</title>
<dateCreated>Sun, 11 Feb 2024 14:01:07 +0000</dateCreated>
<ownerEmail>[email protected]</ownerEmail>
</head>
<body>
<outline text="Daring Fireball" title="Daring Fireball" type="rss" xmlUrl="http://daringfireball.net/index.xml" htmlUrl="https://daringfireball.net/"/>
<outline text="Ars Technica - All content" title="Ars Technica - All content" type="rss" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/>
{
"type": "personal|public",
"for_you": {
"type": "personal|public",
"friends_of_friends": 0,
"from_your_channels": 0,
"curated_by_mammoth": 0,
}
},
@jtomchak
jtomchak / SendMessageToInboxService.rb
Created June 22, 2023 00:51
ActivityPub HTTP Signature and POST activity
# frozen_string_literal: true
# Given a paylaod this will provide a signature
# and POST that payload to the target inbox
class SendMessageToInboxService < BaseService
@relay = 'https://acctrelay.moth.social'
class Error < StandardError; end
def call(target_host, content)
@target_host = target_host
(Mammoth.Status?) $R0 = 0x000000012f3476e0 {
id = some {
_guts = {
_object = (_countAndFlagsBits = 13835058055282163730, _object = 0x400060000ab90930)
}
}
uri = "https://mstdn.party/users/howtolovecomics/statuses/110341207370795443"
url = "https://mstdn.party/@howtolovecomics/110341207370795443"
account = 0x000000012f3407a0 {
id = "109389405468200888"
//
// FontAwesomeIcon.swift
// Mastodon
//
// Created by Jesse Tomchak on 4/19/23.
//
import Foundation
struct IconStyle {
import Foundation
import SwiftUI
@main
struct MacApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
Documents/code/functions-hard-hat-starter-kit-chainlink on  tutorial-6 [=$+?⇡]  v0.1.0 using  v16.14.0 took 4s
➜ npx hardhat functions-simulate
secp256k1 unavailable, reverting to browser version
{
name: 'hardhat',
config: {
hardfork: 'merge',
blockGasLimit: 30000000,
gasPrice: 'auto',
chainId: 31337,
@jtomchak
jtomchak / Demo.js
Last active February 10, 2023 19:53
import React from "react";
function Demo() {
return <h2>HOLY BUCKETS</h2>;
}
export default Demo;