Skip to content

Instantly share code, notes, and snippets.

View disler's full-sized avatar

IndyDevDan disler

View GitHub Profile
@disler
disler / notion_create_page_add_text.py
Created May 14, 2023 14:23
Notion - create a page then write content to the page
from notion_client import Client
from pprint import pprint
notion_token = '<your token>'
notion_page_id = '<your page id>'
def create_page(client, parent_page_id, title):
new_page = client.pages.create(
parent={
@disler
disler / machine.js
Last active July 5, 2020 15:32
Generated by XState Viz: https://xstate.js.org/viz
const makeTradeInvalid = assign((c, e) => ({valid_trade: false}))
const fetchMachine = Machine({
id: 'trade',
initial: 'begin_trade',
context: {
valid_trade: true,
},
states: {
begin_trade: {
on: {