Skip to content

Instantly share code, notes, and snippets.

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

Daniel Rodríguez Rivero danielo515

🏠
Working from home
View GitHub Profile
@schickling
schickling / effect-httpclient-usage-guide.md
Created December 5, 2025 08:32
Effect HttpClient usage patterns with verified examples (Bun + FetchHttpClient)

Effect HttpClient Usage Guide

Minimal verified recipe (Bun + FetchHttpClient)

  • Tested against httpbin; includes retries, base URL, schema decoding.
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "@effect/platform"
import { Effect, Schema, Schedule } from "effect"

const Args = Schema.Record({ key: Schema.String, value: Schema.String })
{
"egen": {
"prefix": "egen",
"body": [
"Effect.gen(function* () {",
" $0",
"})"
],
"description": "Effect.gen"
},
@madyanalj
madyanalj / config.ts
Created August 8, 2024 10:15
Effect RPC with Cloudflare Workers
import { Effect as E, Schema } from "@effect/schema"
import {
BooleanFromSelfOrString,
NonEmptyObject,
ObjectValue,
} from "@o/shared"
import { ConfigProvider, Context, Layer } from "effect"
const WorkerBinding = <T extends object>() =>
NonEmptyObject.pipe(
@MrFunctor
MrFunctor / tsconfig.json
Created November 19, 2023 16:16
tsconfig.json with common fp-ts namespace imports configured with @unsplash/ts-namespace-import-plugin
{
"compilerOptions": {
"plugins": [
{
"name": "@unsplash/ts-namespace-import-plugin",
"namespaces": {
"A": {
"importPath": "fp-ts/Array"
},
"B": {
@kLabz
kLabz / Job.hx
Last active December 11, 2022 10:53
Lua test
#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.TypeTools;
#end
@:remove // Doesn't seem to work on lua, eh
interface Job<TJobOpt:{}> {}
@:pure
@dedalodaelus
dedalodaelus / esp32-uptime-preserve-deep-sleep.yaml
Created June 5, 2021 01:41
Esphome uptime preserve during deepsleep
---
substitutions:
devicename: esp32-arduino
friendly_name: Dev Full Board
sleep_time: 20s
wifi_signal_update: 20s
#sensors_update: 1s
uptime_update: 2s
esphome:
@elliot-huffman
elliot-huffman / .gitignore
Last active July 15, 2025 05:40
A gitignore for all of your Apache Cordova needs.
# Cordova Global
plugins/
# iOS Platform
platforms/ios/build/
platforms/ios/www/
platforms/ios/cordova/console.log
*.xcuserdatad
# Android Platform
@haxiomic
haxiomic / Partial.hx
Last active February 26, 2023 11:44
Haxe macro to make all fields of a type optional (similar to Typescript's Partial<T>)
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.TypeTools;
#if !macro
@:genericBuild(PartialMacro.build())
#end
class Partial<T> {}
class PartialMacro {
@brianweet
brianweet / orange-pi-script.txt
Created September 10, 2016 15:08
orange pi setup script
#!/bin/bash
## This script is developed from my Raspberry Pi script - for the Orange Pi PC
## But see the blog - you have to use a particular version of Debian
## and scripts - then expand, reboot and use this script having given it execute
## permissions. See http://tech.scargill.net/orange-pi-pc-battle-of-the-pis/
## Latest updates removing need for some manual work - thanks to Antonio Fragola.
# Get time as a UNIX timestamp (seconds elapsed since Jan 1, 1970 0:00 UTC)
startTime="$(date +%s)"
@lavaxun
lavaxun / README.md
Last active February 18, 2018 00:22 — forked from vincent99/README.md
Rancher on docker-for-mac with xhyve

Install Docker for Mac (http://beta.docker.com)

Install docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)

brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Deploy the latest release