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
{
"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 February 21, 2022 22:58
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

@Arlen22
Arlen22 / Hosting multiple tiddlywikis on Express.md
Last active May 21, 2021 13:08 — forked from anonymous/index.js
A file to allow running multiple TiddlyWikis as seperate folders of an Express JS application. Made with 5.1.9. Amended for 5.1.14-Prerelease. My part is released into the Public Domain.
  • Download the NodeJS version of TiddlyWiki from GitHub or NPM. If you use NPM, do not use the global option (-g).
  • Put web.js beside tiddlywiki.js.
  • Require web.js from the Express application and call it on every matching request (see below).
  • For TiddlyWiki before 5.1.14-Prerelease: In core/modules/commands/server.js, seperate out the requestHandler function that is passed to http.createServer so it is on the SimpleServer prototype. Add the self variable to the first line of the requestHandler as shown.
SimpleServer.prototype.listen = function(port,host) {
	http.createServer(this.requestHandler.bind(this)).listen(port,host);
};
SimpleServer.prototype.requestHandler = function(request,response) {