Skip to content

Instantly share code, notes, and snippets.

View SamSamskies's full-sized avatar
🚀
vamos

Sam Samskies SamSamskies

🚀
vamos
  • Various
View GitHub Profile
@SamSamskies
SamSamskies / thepoofening.js
Last active September 22, 2024 15:46
#thepoofening
import 'websocket-polyfill'
import {SimplePool, finishEvent, nip19} from 'nostr-tools'
import 'dotenv/config'
const privateKey = nip19.decode(process.env.NOSTR_NSEC).data;
const pool = new SimplePool()
const relays = ['wss://nostr.mutinywallet.com']
const events = await pool.list(relays, [{
@SamSamskies
SamSamskies / sendPaymentBookmarklet.txt
Created August 17, 2024 02:19
Override WebLN sendPayment bookmarket
javascript:(function(){window.webln.sendPayment=(invoice)=>fetch(`https://api.qrserver.com/v1/create-qr-code/?data=${invoice}&size=400x400&margin=15`).then(response=>response.blob()).then(blob=>{const qrCodeUrl=URL.createObjectURL(blob);const modal=document.createElement('div');modal.style.position='fixed';modal.style.top='0';modal.style.left='0';modal.style.width='100%';modal.style.height='100%';modal.style.background='rgba(0, 0, 0, 0.5)';modal.style.display='flex';modal.style.justifyContent='center';modal.style.alignItems='center';const img=document.createElement('img');img.src=qrCodeUrl;img.style.width='400px';img.style.height='400px';modal.appendChild(img);document.body.appendChild(modal);modal.onclick=()=>{modal.remove();};});})();
@SamSamskies
SamSamskies / sendPayment.js
Created August 17, 2024 02:10
Override WebLN sendPayment
window.webln.sendPayment = (invoice) => fetch(`https://api.qrserver.com/v1/create-qr-code/?data=${invoice}&size=400x400&margin=15`)
.then(response => response.blob())
.then(blob => {
const qrCodeUrl = URL.createObjectURL(blob);
const modal = document.createElement('div');
modal.style.position = 'fixed';
modal.style.top = '0';
modal.style.left = '0';
modal.style.width = '100%';
modal.style.height = '100%';
@SamSamskies
SamSamskies / bitcoin-treasure-map-1.md
Last active October 18, 2020 16:21
Details about Bitcoin Treasure Map #1
@SamSamskies
SamSamskies / Portal.tsx
Created April 4, 2020 17:37
Simple React Portal
import React, { useRef, useEffect } from 'react';
import { createPortal } from 'react-dom';
const Portal: React.FC = ({ children }) => {
const el = useRef<HTMLDivElement | null>(null);
useEffect(() => {
el.current = document.createElement('div');
document.body.appendChild(el.current);
@SamSamskies
SamSamskies / keybase.md
Created September 22, 2019 05:30
Keybase verification

Keybase proof

I hereby claim:

  • I am samsamskies on github.
  • I am samsamskies (https://keybase.io/samsamskies) on keybase.
  • I have a public key ASA4rOHq-mqzOR0DTvzU6RcSZ75KorcOFjqCLbeBogQObQo

To claim this, I am signing this object:

@SamSamskies
SamSamskies / leporine.md
Created May 4, 2019 17:44 — forked from johncantrell97/leporine.md
How To Obtain The Leporine Key

Hello again.

I was not the first to find the key this time, props to EnigmaZer0 for this one! After seeing that everyone enjoyed understanding how the first clues were solved I thought I'd provide an explanation for The Leporine Key.

The second clue dropped early afternoon EDT on (easter) Sunday April 21 2019. The clue can be viewed on the satoshis treasure website here and looked like this:


 _____       _            _     _ _       _____
/  ___|     | |          | |   (_| )     |_   _|
@SamSamskies
SamSamskies / satoshistreasure.md
Created April 16, 2019 20:06 — forked from johncantrell97/satoshistreasure.md
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was

@SamSamskies
SamSamskies / ip-protocol-numbers.json
Last active February 9, 2021 11:31
IANA list of IP protocol numbers
{
"0": {
"keyword": "HOPOPT",
"protocol": "IPv6 Hop-by-Hop Option",
"reference": "[RFC8200]"
},
"1": {
"keyword": "ICMP",
"protocol": "Internet Control Message",
"reference": "[RFC792]"
Verifying my Blockstack ID is secured with the address 14MRKfWcYQiKSe5JhwxsCwQZzA11M6gy6V https://explorer.blockstack.org/address/14MRKfWcYQiKSe5JhwxsCwQZzA11M6gy6V