Skip to content

Instantly share code, notes, and snippets.

View bentsai's full-sized avatar
🏠
Working from home

Ben Tsai bentsai

🏠
Working from home
View GitHub Profile
@bentsai
bentsai / arrange.ts
Created June 29, 2022 18:29
Script that arranges Kinopio cards in reverse-chronological order
const jsonResponse = await fetch(
"https://api.kinopio.club/space/<space ID>",
);
const spaceJson = await jsonResponse.json();
// console.log(spaceJson);
const cards = spaceJson.cards;
const sortedCards = cards.sort((a: any, b: any) => a.createdAt < b.createdAt);
console.log(sortedCards);
@bentsai
bentsai / kinopio-cards-list.sh
Created September 18, 2020 04:01
Kinopio card names in created order
export KINOPIO_API_KEY=<enter `JSON.parse(localStorage.user).apiKey` in console>
export KINOPIO_SPACE_KEY=<space key>
curl -H "Authorization: $KINOPIO_API_KEY" https://kinopio-server.herokuapp.com/space/$KINOPIO_SPACE_KEY | jq -r '.cards | .[] | .createdAt + "\t" + (.name | tojson)' | sort
@bentsai
bentsai / Guide.md
Created December 15, 2018 17:30 — forked from kneath/Guide.md
FoldingText 2.0's User Guide

Welcome to the User's Guide

Remember, it's all just text.

FoldingText does some neat things, but in the end you are just typing. If you know how to type, you already know most of what you need to effectively use FoldingText.

(Click "#" to expand headings)


A list

  1. Patch
  2. Forever

Keybase proof

I hereby claim:

  • I am bentsai on github.
  • I am bentsai (https://keybase.io/bentsai) on keybase.
  • I have a public key whose fingerprint is 77E2 7E29 8FE3 D7B7 1164 2B97 6D80 E750 42F4 7AC2

To claim this, I am signing this object:

Jesus Loves Me
Chris Tomlin
I was lost
I was in chains
The world had a hold of me
My heart was a stone
I was covered in shame
When He came for me
@bentsai
bentsai / .doingrc
Created June 9, 2015 15:17
My current .doingrc
---
doing_file: "~/Dropbox/Notes/Lists/what_was_i_doing.md"
current_section: Currently
editor_app:
templates:
default:
date_format: "%Y-%m-%d %H:%M"
template: "%date | %title%note"
wrap_width: 0
today:
@bentsai
bentsai / gist:8025512
Created December 18, 2013 16:41
2013-12-18 Uncle Sam's Order
  • Uncle Sam's Spcial with everything
  • Waffle fries
@bentsai
bentsai / dayone.py
Created March 8, 2013 05:19
dayone
from plistlib import writePlistToString
from datetime import datetime
from uuid import uuid4
def create_dayone_dict(entry_text):
d = {
'Creation Date': datetime.now(),
'Entry Text': entry_text,
'UUID': str(uuid4()).translate(None, '-'),
'Time Zone': 'America/New_York'
@bentsai
bentsai / dayoneposter.py
Created March 8, 2013 05:18
dayoneposter
import dropboxclient
import urllib
import webbrowser
import datetime
def get_log_files(logdir):
client = dropboxclient.get_client()
metadata = client.metadata(logdir)
print metadata