Skip to content

Instantly share code, notes, and snippets.

@considine
considine / transcribe.mjs
Created December 24, 2022 19:13
Transcribes a video saved in a Notion Database, and saves the transcription to the page
#!/usr/bin/env zx
const body = await fetch(
`https://api.notion.com/v1/databases/${process.env.NOTION_DATABASE_ID}/query`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NOTION_API_KEY}`,
"Notion-Version": "2022-06-28",
"Content-Type": "application/json",
#! /bin/bash
MY_DIR=$PWD
if [[ $# -lt 2 ]]; then
echo 'Please provide two timestamps of the format hh:mm:ss. The first is where you want a "Before" frame, and the second is where you want an "After" frame'
exit 0
fi
if [[ $# -lt 3 ]]; then
@considine
considine / RN.md
Created October 26, 2021 18:22
Copy style guide into public gist

K-Optional Software React Native Style Guide

The main objectives of this guide are to:

  1. Reduce overhead in collaborating on RN projects
  2. Prevent bad practices from creeping into RN projects
  3. Eliminate mentally-draining decisions when developing with RN

New Project Checklist

# if you already have ionic installed
npm update -g ionic
# If you have not installed ionic
npm install -g ionic
#NOTE if your global npm directory is user protected, you may need to use sudo in front of the command:
sudo npm install -g ionic
export interface IHuman {
name: string;
age: string;
location: string;
height: string;
}
function outputInformation(name: string, age: string, location: string, height: string, isMale: boolean = false) {
console.log(`Name: ${name}, Age: ${age}, Location: ${location}, Height: ${height}, isMale: ${isMale}`);
}
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');
var api = new ParseServer({
// Parse Server settings
});
var options = { allowInsecureHTTP: false };
<style>
.controls {
display: none;
}
@media (max-width: 800px) {
.plan {
display: none;
}
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>
List
</ion-title>
</ion-toolbar>
</ion-header>
import { Observable } from "rxjs";
import { PostsService } from "./../posts.service";
import { Component, OnInit } from "@angular/core";
@Component({
selector: "app-list",
templateUrl: "categories.page.html",
styleUrls: ["categories.page.scss"]
})
export class CategoriesPage implements OnInit {
.readmore {
display: none;
}
.featured-image {
max-height: 150px;
margin-left: auto;
margin-right: auto;
}