Skip to content

Instantly share code, notes, and snippets.

View jasontarnold's full-sized avatar

Jason jasontarnold

View GitHub Profile
@POD666
POD666 / Notion duplicate page script example (python)
Last active August 29, 2023 09:26
Notion page duplication requires recursive blocks population and extra tricks to duplicate images. Hope this example will help someone who also struggle with notion API.
import logging
import os
from io import BytesIO
import boto3
import click
import requests
@nickolasteixeira
nickolasteixeira / Create a Wyre Account (Bearer Token Auth)
Last active April 21, 2022 12:33
Create a Wyre Account (Bearer Token Auth)
################### Generate a secrey key ###################
# First generate your own secret key.
## Add code here to generate your own secret key
# Python: https://blog.miguelgrinberg.com/post/the-new-way-to-generate-secure-tokens-in-python
# Nodejs: https://stackoverflow.com/questions/8855687/secure-random-token-in-node-js (Make sure to change it to 25-35 characters)
#################### Get API Key ###################
# Next, send a post request with your secret key, which will return a api key
require 'uri'
require 'net/http'
require 'openssl'
require 'json'
require 'byebug'
class WyreApi
ACCOUNT_ID = '**-*************'
API_KEY = '****-****-****-****'
SEC_KEY = '****-****-****-****'