Skip to content

Instantly share code, notes, and snippets.

View dschinkel's full-sized avatar
💻

Dave Schinkel dschinkel

💻
View GitHub Profile
@dschinkel
dschinkel / ConvertOneNote2MarkDown-options.csv
Created November 20, 2023 08:40
ConvertOneNote2MarkDown options I selected
View ConvertOneNote2MarkDown-options.csv
option text selected option
Dry Run Enter (keep default)
Folder Path Enter (keep default) - this will export it to c:\temp\notes
Specify a notebook to convert Enter (keep default)
Create a new word .docx Enter (keep default)
Discard .docx after conversion 2 - keep the .docx
Use name .docx fiels using page ID 2 - use hierarchy
Use prefix vs subfolders Enter (keep default)
Markdown file length 255
Store media in single or multiple folders 2 - separate for each folder in hierarchy
@dschinkel
dschinkel / query_for_a_program.js
Created September 22, 2022 23:01
Graph Query Example: Querying the Graph for Program Data
View query_for_a_program.js
{
programs(where: {
id: "0xceb11bb2725f0ee33f49b5052b3276c02f751c16" // program contract id
}) {
id
metaPtr {
protocol
pointer // ipfs pointer to document which holds more data about a specific program
}
}
@dschinkel
dschinkel / Set.java
Created June 21, 2022 05:39
TDD a Java Set - Attempt 5
View Set.java
package set;
import java.util.Objects;
public class Set {
private int size;
private final int DEFAULT_SIZE = 10;
private String[] elements = new String[DEFAULT_SIZE];
@dschinkel
dschinkel / Set.java
Last active June 21, 2022 01:02
TDD a Java Set - Attempt 4
View Set.java
package set;
import java.util.Objects;
public class Set {
private String[] elements = new String[0];
private int next;
public boolean isEmpty() {
return next == 0;
@dschinkel
dschinkel / list.featured.crafters.spec.tsx
Last active April 25, 2022 17:45
Example Integration Test using isolate-react library
View list.featured.crafters.spec.tsx
@dschinkel
dschinkel / create-and-insert-countries.sql
Last active April 24, 2022 05:39
Postgres Dialect | dr5hn / countries-states-cities-database
View create-and-insert-countries.sql
CREATE TABLE countries (
id integer NOT NULL,
name varchar(100) NOT NULL,
iso3 char(3) DEFAULT NULL,
numeric_code char(3) DEFAULT NULL,
iso2 char(2) DEFAULT NULL,
phonecode varchar(255) DEFAULT NULL,
capital varchar(255) DEFAULT NULL,
currency varchar(255) DEFAULT NULL,
currency_name varchar(255) DEFAULT NULL,
@dschinkel
dschinkel / CompanyDetailNew.js
Last active February 24, 2021 03:36
Assert runs before hook done updating state
View CompanyDetailNew.js
import React, { useEffect, useState } from 'react';
import { CompanyNew } from '../../../Interfaces/Interfaces';
import Main from '../Main';
import MainLayout from '../MainLayout';
interface CompanyDetailNewProps {
fetchCompanyNew: (apiFindCompanyNew: any, companyName: string) => Promise<CompanyNew>,
apiFindCompanyNew: (companyName: string) => Promise<CompanyNew>,
companyName: string
}
@dschinkel
dschinkel / MigrateDB.yml
Last active March 20, 2022 03:50
Example Github Action that Migrates DB Schema via Flyway
View MigrateDB.yml
name: SQL-Migrations
on:
push:
branches:
- master
jobs:
migrate:
name: Migrate Database
@dschinkel
dschinkel / FeaturedCompanies.js
Last active October 7, 2020 19:58
Shallow Render Hook with Async Side Effects
View FeaturedCompanies.js
import React, { useEffect, useState } from 'react';
import { Company } from '../../Interfaces/Interfaces.company';
interface FeaturedCompaniesProps {
findFeaturedCompanies: () => Promise<Array<Company>>
}
const FeaturedCompanies = (props: FeaturedCompaniesProps) => {
const [featuredCompanies, setData] = useState([]);
useEffect(() => {
@dschinkel
dschinkel / FeaturedCompanies.js
Last active October 5, 2020 03:27
Attempt #1 - Invert Business Logic
View FeaturedCompanies.js
import React, { useEffect, useState } from 'react';
import { Company } from '../../Interfaces/Interfaces.Company';
// this doesn't work with brackes for some reason:
// const FeaturedCompanies = ({findFeaturedCompanies: () => Promise<Array<Company>>}) => {
const FeaturedCompanies = (findFeaturedCompanies: () => Promise<Array<Company>>) => {
const [featuredCompanies, setData] = useState([]);
useEffect(() => {