Skip to content

Instantly share code, notes, and snippets.

View sbddesign's full-sized avatar
🟠
Designing some bitcoins

Stephen DeLorme sbddesign

🟠
Designing some bitcoins
View GitHub Profile
@sbddesign
sbddesign / nostr-tools.tsx
Created March 18, 2023 14:02
Using Nostr Tools in a Typescript NextJS project
import Head from 'next/head'
import Image from 'next/image'
import { Inter } from 'next/font/google'
import { generatePrivateKey, getPublicKey, validateEvent, verifySignature, signEvent, getEventHash, UnsignedEvent } from 'nostr-tools'
import React from 'react'
export default function Home() {
const [privKey, setPrivKey] = React.useState('')
const [pubKey, setPubKey] = React.useState('')
const [event, setEvent] = React.useState(JSON.stringify({}))
@sbddesign
sbddesign / atlanta-bitdevs-socratic-2.md
Last active September 15, 2021 20:54
Atlanta BitDevs - Socratic Seminar #2 Topics

Socratic Seminar #2 & Texas Recap

Several of us Atlanta peoplewent to Texas for PlebFi and BitBlockBoom. Here are interesting things we found.

PlebFi

Organized by Jeremy Rubin's and Sarah Satoshi. Many of the topics are focused around DeFi and other novel use cases for Bitcoin.

Schedule and Speakers

@sbddesign
sbddesign / lnbook_chapter-5-notes.md
Created August 17, 2021 16:56
Notes on Chapter 5 for lnbook

Operating a Node

Helpers

  • RaspiBlitz
  • MyNode
  • Umbrel
  • BTCPayServer

Operating the MyNode

@sbddesign
sbddesign / fountain-regex-remove-scene-numbers.md
Last active November 28, 2019 09:47
Fountain - RegEx to strip out scene numbers

Fountain - RegEx to strip out scene numbers

This regular expression is for removing scene numbers in the Fountain screenwriting language.

Find

(^.+) #[^#]+#($)

Replace

@sbddesign
sbddesign / ApacheLog-to-CSV-RegEx.md
Created June 27, 2019 16:35
This regular expression is for converting lines of Apache log files into CSV (Comma Separated Values).

Apache Log to CSV

This regular expression is for converting lines of Apache log files into CSV (Comma Separated Values).

Find

^(\d+.\d+.\d+.\d+) - - (\[.+\]) "(.+) (.+) (H.+)" (\d{3}) (\d+) (".+") (".+")$

Replace

$1, $2, $3, $4, $5, $6, $7, $8, $9

@sbddesign
sbddesign / outlook-high-dpi-fix.html
Last active October 18, 2018 17:35
Fixes problems with image size and layout for HTML emails viewed in Outlook in 120dpi
<!-- Thanks to Courtney Fantinato: http://www.courtneyfantinato.com/correcting-outlook-dpi-scaling-issues/ -->
<!-- Use HTML tag with an XML namespace for the Microsoft Office engine -->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- Typical head content here -->
<!-- Scales images appropriately for High DPI in Outlook -->
<!--[if gte mso 9]>
@sbddesign
sbddesign / ae-intertia.jsx
Created November 25, 2017 19:11
Inertia expression for AfterEffects
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n == 0){
t = 0;
}else{
@sbddesign
sbddesign / responsive-iframe-video.scss
Created November 17, 2017 17:08
SCSS to make video iframes responsive.
.video-container {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 56.25%; //Set back to 56.25% ************
iframe {
position: absolute;
top: 0;
left: 0;

Keybase proof

I hereby claim:

To claim this, I am signing this object: