Skip to content

Instantly share code, notes, and snippets.

View hosmelq's full-sized avatar
🎯
Focusing

Hosmel Quintana hosmelq

🎯
Focusing
View GitHub Profile
@hosmelq
hosmelq / stripe-keys-and-ids.tsv
Created March 6, 2024 16:15 — forked from fnky/stripe-keys-and-ids.tsv
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.
@hosmelq
hosmelq / README.md
Created June 15, 2023 22:58 — forked from koshatul/README.md
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
import {createMachine, createSchema} from 'xstate'
import {assign} from '@xstate/immer'
import {ToastProps} from 'components/Toast'
type AddToastEvent = {
type: 'ADD_TOAST'
toast: ToastProps
}
@hosmelq
hosmelq / machine.js
Last active June 29, 2020 16:14
Generated by XState Viz: https://xstate.js.org/viz
const {cancel} = actions
Machine(
{
id: `searchBox`,
initial: `idle`,
context: {
query: ``,
results: [],
},
@hosmelq
hosmelq / machine.js
Last active April 25, 2020 03:55
Generated by XState Viz: https://xstate.js.org/viz
const {cancel} = actions
Machine(
{
id: `createContract`,
initial: `editing`,
context: {
grades: [],
query: ``,
services: [],
@hosmelq
hosmelq / machine.js
Last active April 17, 2020 23:34
Generated by XState Viz: https://xstate.js.org/viz
const CourierOnboardingVerificationsItemState = {
IN_REVISION: `IN_REVISION`,
PENDING: `PENDING`,
VERIFIED: `VERIFIED`,
}
Machine(
{
id: `emergencyContact`,
initial: `unknown`,
@hosmelq
hosmelq / machine.js
Last active April 18, 2020 00:40
Generated by XState Viz: https://xstate.js.org/viz
const CourierOnboardingVerificationsItemState = {
IN_REVISION: `IN_REVISION`,
PENDING: `PENDING`,
VERIFIED: `VERIFIED`,
}
const CourierState = {
ACTIVE: `ACTIVE`,
BLOCKED: `BLOCKED`,
PENDING: `PENDING`,
REJECTED: `REJECTED`,
@hosmelq
hosmelq / machine.js
Last active March 11, 2020 18:30
Generated by XState Viz: https://xstate.js.org/viz
function buildVibrationPattern(seconds) {
return new Array(seconds / 1500)
.fill(null)
.reduce(prev => [...prev, 0, 1000, 500], [])
}
const DEFAULT_WAIT_TIME = 30000
const CURRENT_ORDER_STATE = `WAITING_COURIER`
const ORDER_STATE = {
IN_PROGRESS: `IN_PROGRESS`,
@hosmelq
hosmelq / machine.js
Last active March 12, 2020 05:31
Generated by XState Viz: https://xstate.js.org/viz
Machine(
{
id: `order-stop-machine`,
initial: `unknown`,
context: {
pictureUri: null,
signatureUri: null,
stop: null
},
states: {
@hosmelq
hosmelq / machine.js
Last active December 14, 2019 01:05
Generated by XState Viz: https://xstate.js.org/viz
function buildVibrationPattern(seconds) {
return new Array(seconds / 1500)
.fill(null)
.reduce(prev => [...prev, 0, 1000, 500], [])
}
const ACTIVE = `active`
const BACKGROUND = `background`
const WAIT_TIME = 30000
const PATTERN = buildVibrationPattern(WAIT_TIME)