Skip to content

Instantly share code, notes, and snippets.

View rhcarvalho's full-sized avatar
🎥
Building something new

Rodolfo Carvalho rhcarvalho

🎥
Building something new
View GitHub Profile
@fnky
fnky / stripe-keys-and-ids.tsv
Last active March 29, 2024 22:52
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@msbarry
msbarry / README.md
Last active September 13, 2023 18:34
Visvalingam vs. Douglas-Peucker

Two well-known algorithms for polyline simplification are the Douglas Peucker and Visvalingam algorithms.

The Douglas Peucker algorithm uses a recursive divide-and-conquer approach. It starts by drawing a straight line from the first point to the last point. Then it finds the intermediate point that is furthest away from the straight line and deems this the "most important" and splits the polyline into two halves at that point. This process is repeated on both halves until the distance of the intermediate point is below a certain threshold, after which all points on that sub-polyline are thrown away since they have a negligible impact on the overall shape.

The Visvalingam algorithm works from the inside-out. It starts by computing the area of the triangle formed by each consecutive three points along the polyline. Then the midpoint of the triangle with the least area is thrown out since those three points are the closest to colinear and the area of triangles on either side are recomputed. The process

@enajski
enajski / base_cf_docs.md
Last active September 26, 2016 15:56
Documentation for Base CRM custom fields
@jeapostrophe
jeapostrophe / explore.rkt
Created July 5, 2012 03:00 — forked from jadudm/explore.rkt
Exploration of the PLT web server...
#lang racket/base
;; Each library function is prefixed by the module it came from.
(require web-server/dispatch)
(define-values (dispatch blog-url)
(dispatch-rules
[("go") go]))
;; dispatch-rules patterns cover the entire URL, not just the prefix,