Skip to content

Instantly share code, notes, and snippets.

@jimmyz
jimmyz / chatgpt-gpt4-script-output
Created April 26, 2023 17:04
Historical Record as a John Wayne script
Prompt: "Rewrite this document as the script of John Wayne movie with John Wayne as William Foulks."
Title: Vengeance on Mould Street
INT. FLINT COUNTY COURTROOM - DAY
A somber atmosphere fills the courtroom as JUSTICE WHITMORE, a stern middle-aged man, presides over the witness stand. GABRIEL JONES, a rugged yeoman, stands to testify about the tragic events that occurred in Mould.
JUSTICE WHITMORE
Mr. Jones, please recount the events concerning the death of Ann Foulks, wife of William Foulks of Mould, who is believed to have been killed by John Roberts of Garth Gammon.
@jimmyz
jimmyz / create_challenge.js
Created November 6, 2020 18:24
PKCE Code Verifiers and Challenges for JavaScript
// Modified from sample code provided by Auth0
// https://auth0.com/docs/flows/call-your-api-using-the-authorization-code-flow-with-pkce#javascript-sample
// Run with `node create_challenge.js`
const crypto = require('crypto');
function base64URLEncode(str) {
return str.toString('base64')
.replace(/\+/g, '-')
@jimmyz
jimmyz / genealogies-api-details.md
Last active October 26, 2020 20:17
Working draft for Genealogies Sync

Syncing Data to Genealogies

In order to sync data to the Genealogies system, use the following process:

  1. Obtain access token for the user.
  2. Create a new Genealogies Tree.
  3. Add data to the Genealogies Tree.
  4. Update persons and relationships.
  5. Get the matches.
@jimmyz
jimmyz / gist:03d064e79db6490a556c90ae841331a2
Created September 19, 2018 02:14
Preferred Parent Read
{
"childAndParentsRelationships": [
{
"id": "MTKG-DBV",
"father": {
"resource": "https://api.familysearch.org/platform/tree/persons/L2YM-NBS",
"resourceId": "L2YM-NBS"
},
"mother": {
"resource": "https://api.familysearch.org/platform/tree/persons/L2YM-ND7",
@jimmyz
jimmyz / gist:5dcbe8c6eb2b22adef9862a3dc67c866
Created September 19, 2018 02:03
Parents Read - Child and Parents Relationships
"childAndParentsRelationships": [
{
"id": "MTKG-DBV",
"father": {
"resource": "#L2YM-NBS",
"resourceId": "L2YM-NBS"
},
"mother": {
"resource": "#L2YM-ND7",
"resourceId": "L2YM-ND7"
"nameForms": [
{
"lang": "ko-Hang",
"fullText": "철 하늘별님구름햇님보다사랑스러우리",
"parts": [
{
"type": "http://gedcomx.org/Surname",
"value": "철"
},
{
"nameForms": [
{
"lang": "ko-Hang",
"fullText": "건 하늘별님구름햇님보다사랑스러우리",
"parts": [
{
"type": "http://gedcomx.org/Surname",
"value": "건"
},
{
@jimmyz
jimmyz / Gemfile
Created February 16, 2017 05:38
Omniauth Example
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'sinatra', '~> 1.4', '>= 1.4.7'
gem 'omniauth-familysearch'
@jimmyz
jimmyz / setup.php
Created August 6, 2015 19:51
gedcomx-php Logging
<?php
require __DIR__ . '/../../vendor/autoload.php';
include 'functions.php';
use Gedcomx\Extensions\FamilySearch\Rs\Client\FamilySearchClient;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
session_start();
@jimmyz
jimmyz / SDK-Specification.md
Last active August 29, 2015 14:23
FamilySearch SDK Specification

FamilySearch SDK Specification

This document is a working specification for FamilySearch's SDK development and delivery across programming languages.

Core Target Languages:

FamilySearch targets the following core programming languages:

  • PHP
  • Java