Skip to content

Instantly share code, notes, and snippets.

View alessandrobelli's full-sized avatar
👨‍💻
Coding

Alessandro Belli alessandrobelli

👨‍💻
Coding
View GitHub Profile
@alessandrobelli
alessandrobelli / index.js
Created March 27, 2022 15:26
Get Started with Notion API
import { Client } from "@notionhq/client";
import "dotenv/config";
console.log(process.env.NOTION_KEY);
const notion = new Client({ auth: process.env.NOTION_KEY });
const databaseId = process.env.NOTION_DATABASE_ID;
async function addItem(text) {
try {
const response = await notion.pages.create({
.notion-peek-renderer > div:nth-child(2){background-color: #28282F !important;}
div.notion-bookmark-block *{color:#A2A2A6 !important;}
.notion-peek-renderer > div:nth-child(2) > div:nth-child(1) {display: none !important;}
div.notion-scroller:nth-child(3) > div:nth-child(2){display:none !important;}
.notion-light-theme .notion-frame {background-color: #28282F !important;}
.notion-page-content {color: #A2A2A6 !important;}
[placeholder*="Heading"]{color:#61F0A9 !important;}
[placeholder*="Untitled"]{color:#61F0A9 !important;}
.notion-link-token:hover{color:#61F0A9 !important;}
div.notion-selectable:nth-child(6) > div:nth-child(1) > div:nth-child(3) > div:nth-child(1) {font-size: 14px !important;}
@alessandrobelli
alessandrobelli / gist:484f9d737fb3de57a0018931e1d7cafa
Created February 9, 2021 13:21
Sync your data to your external hard drive
💻Windows: robocopy "SOURCEPATH" "DESTINATIONPATH" /E /MIR
💻macOs: rsync -r -v -u SOURCEPATH "DESTINATIONPATH"
With macOs add "-- delete" to remove files at the destination that are not in source.
Shebang for macOS script: #!/bin/bash