This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # ./bin/push-db | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'highline' | |
| gem 'kamal' | |
| gem 'net-ssh-gateway' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Context, Controller } from "@hotwired/stimulus"; | |
| interface PClass<T> { | |
| prototype: T; | |
| } | |
| // Camelback | |
| type Cbz<T extends string> = T extends `${infer A}_${infer B}` | |
| ? `${A}${Cbz<Capitalize<B>>}` | |
| : T extends `${infer A}-${infer B}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { pipe } from '@fp-ts/core/Function'; | |
| import * as A from '@fp-ts/core/ReadonlyArray'; | |
| import * as HashMap from '@effect/data/HashMap'; | |
| import { dual } from '@fp-ts/core/Function'; | |
| const compare = { | |
| number: (a: number, b: number) => a - b, | |
| string: (a: string, b: string) => | |
| a.localeCompare(b, 'en', { sensitivity: 'base' }), | |
| Date: (a: Date, b: Date) => a.getTime() - b.getTime(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| impport * as Z from '@effect/io/Effect'; | |
| export { loader } from '~/runtime'; | |
| export const zloader: Z.Effect<..., ..., ...> = currentUserOrRedirect($path('/login')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| There was an error running the data loader for route routes/dashboard.posts | |
| Error: Service not found | |
| at /Users/pigoz/dev/superagent/node_modules/src/internal/Context.ts:130:13 | |
| at Object.successK (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/core.ts:915:60) | |
| at Object.4 (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/fiberRuntime.ts:96:17) | |
| at FiberRuntime.6 (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/fiberRuntime.ts:980:36) | |
| at FiberRuntime.runLoop (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/fiberRuntime.ts:1173:47) | |
| at FiberRuntime.evaluateEffect (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/fiberRuntime.ts:785:29) | |
| at FiberRuntime.start (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/fiberRuntime.ts:840:14) | |
| at RuntimeImpl.unsafeRunWith (/Users/pigoz/dev/superagent/node_modules/@effect/io/src/internal/runtime.ts:98:18) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const pool = (name: string, self: DbTest) => { | |
| return it(name, async () => { | |
| return await zdb.serializable(pgpool, async conn => { | |
| await self(conn); | |
| await zdb.sql`ROLLBACK`.run(conn); | |
| }); | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as E from '@fp-ts/data/Either'; | |
| import * as Z from '@effect/io/Effect'; | |
| import * as Context from '@fp-ts/data/Context'; | |
| import { pipe } from '@fp-ts/data/Function'; | |
| import { | |
| DataFunctionArgs as DataFunctionArgs_, | |
| // LoaderFunction, | |
| // TypedResponse, | |
| // AppLoadContext, | |
| json, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { pipe } from '@fp-ts/data/Function'; | |
| import * as E from '@fp-ts/data/Either'; | |
| import * as Effect from '@effect/io/Effect'; | |
| // import * as Layer from '@effect/io/Layer'; | |
| // import * as Context from '@fp-ts/data/Context'; | |
| import { z } from 'zod'; | |
| import debug_ from 'debug'; | |
| export function decode<T>(schema: z.ZodSchema<T>) { | |
| return (input: unknown): E.Either<z.ZodError<T>, T> => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| import * as t from 'io-ts'; | |
| import { pipe } from 'fp-ts/lib/pipeable'; | |
| import * as E from 'fp-ts/lib/Either'; | |
| import * as TE from 'fp-ts/lib/TaskEither'; | |
| import * as RD from '@devexperts/remote-data-ts'; | |
| interface ApiOptions<T> { | |
| token?: string; | |
| method?: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rspec test.rb 1 ↵ | |
| .......* | |
| Pending: (Failures listed here are expected and do not affect your suite's status) | |
| 1) test find cool test cases | |
| # Temporarily skipped with xit | |
| # ./test.rb:52 | |
NewerOlder