Skip to content

Instantly share code, notes, and snippets.

@david-crespo
david-crespo / readme.txt
Created April 13, 2023 17:30
Light Lines (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@david-crespo
david-crespo / readme.txt
Created April 13, 2023 15:59
Light Lines (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@david-crespo
david-crespo / readme.txt
Created April 12, 2023 17:03
Light Lines (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@david-crespo
david-crespo / ts-release-highlights.md
Last active May 14, 2023 21:03
TypeScript release highlights thru 5.0

TypeScript release highlights

These aren't meant to be comprehensive. They're just the features that most interest me. CFA = control-flow analysis.

1.4: union types and better inference on generics using the union type

1.6: JSX, intersection types, generic type aliases

1.8: type params referring to other type params, string literal types

@david-crespo
david-crespo / README.md
Last active August 26, 2024 14:55
Deckset to web page converter

Deckset to web page converter

This is a handy script to convert a Deckset presentation into a clean web page with the slides on the left and speaker notes on the right. It uses PNGs generated by the Deckset app for the slides and extracts the speaker notes from the presentation markdown.

Setup

Python 3 is required.

pip install markdown jinja2
@david-crespo
david-crespo / LICENSE
Last active July 31, 2020 01:41
Markdown to JIRA script
Copyright 2013 Fokke Zandbergen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@david-crespo
david-crespo / rain-world.md
Last active August 13, 2025 23:12
How to Enjoy Rain World

2025-05-06: The canonical version of this guide is now https://crespo.business/posts/how-to-enjoy-rain-world/


How to Enjoy Rain World

A spoiler-free guide to the spoilers

TL;DR: play as long as you can without help, until you get frustrated. At that point, the recommended region order helps a lot without spoiling anything but region names. If you can't find the next region, the world map (only showing region connections, no detail) will tell you what direction to look in.

@david-crespo
david-crespo / README.md
Last active February 15, 2023 21:30
Download FB tagged photos and videos

Download photos and videos you're tagged in on Facebook

Why

When you download an archive of your Facebook account, Facebook includes photos and videos you've uploaded, but not photos and videos you're tagged in that were uploaded by other people. This is a script to automatically download those.

Setup

This requires Python 3.

@david-crespo
david-crespo / react-in-2-minutes.md
Last active January 18, 2021 07:14
React in 2 Minutes

React in 2 minutes

a React component takes

  • props, which are like HTML attributes, arguments passed in from outside

it has

  • state, an internal object to track state, e.g., the contents of a text field or the value of a checkbox
  • setState, call this to update the state object and trigger a re-render (never modify state directly)
@david-crespo
david-crespo / toggle_scroll.scpt
Created October 25, 2016 17:50
Toggle natural scrolling on MacOS
try
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
click checkbox 1 of tab group 1 of window "Trackpad"