🚧 Work in progress
What does this PR change, add, or delete?
Why is this PR needed?
| Before | After |
| # Run `gem install active_record sqlite3` to install the dependencies | |
| ENV['DATABASE_URL'] = 'sqlite3:/tmp/sqlite.test' # Change this to anything you want | |
| require 'sqlite3' # Make sure to require the correct adapter for your `DATABASE_URL` | |
| require 'active_record' | |
| ActiveRecord::Base.establish_connection | |
| ActiveRecord::Schema.define do |
| Hello world from Tira! |
| import { captureException } from '@sentry/nextjs'; | |
| import { StatusCodes } from 'http-status-codes'; | |
| import { NextApiRequest } from 'next'; | |
| import { z } from 'zod'; | |
| import { NextApiResponseWithData } from '.'; | |
| import { validateSchema } from './validateSchema'; | |
| type RootOptions = { | |
| schema?: z.SomeZodObject; |
| import { ApiHandler, handle, z } from "@backend"; | |
| const schema = z.object({ | |
| query: z.object({ | |
| name: z.string(), | |
| }), | |
| }); | |
| export const response = z.object({ | |
| greeting: z.string(), |
| import sortBy from "lodash/sortBy"; // https://github.com/kvandake/lexorank-ts | |
| import { LexoRank } from "lexorank"; | |
| const cards = [ | |
| { id: 1, rank: "", flag: "0" }, // flag 0: first card, flag 1: last card. We use flag so we don't have to recalculate first and last card. | |
| { id: 2, rank: "", flag: "" }, | |
| { id: 3, rank: "", flag: "1" }, | |
| ]; | |
| function parseRank(rank: string) { |
A test to see if Mermaid diagrams work in Github Gist.
Mermaid docs: https://mermaid-js.github.io/mermaid/#/
graph LR;
John-->EveI write notes in this gist as comments. My original goal was to have a workflow where I can't have an excuse to not write. No websites to manage, no codes to push, no styles to update. Just write. I found Github gist fitting and I don't have issues with writing markdown.
This gist contains "problem-based", technical notes. I encounter a problem, I "google" the solution, I document the solution. Hopefully, I can accumulate the learning and don't have to google again when I encounter the same problem.
Besides problem-based, I also write my "TIL" notes here. They are the new things I learnt that often gave me that "nice" feeling when I first found about it.
There are other things I write like electronics, observations, etc. which I put in different gists. If you want to check it, here's the "sitemap" of all my notes:
| alias zshso="source ~/.zshrc" | |
| alias zshedit="nano ~/.zshrc" | |
| alias clr="clear" | |
| alias cl="clear" | |
| alias cuco="container-use checkout" | |
| alias hist=history | |
| alias ytdl="yt-dlp" # Example: ytdl https://www.youtube.com/watch?v=BBJa32lCaaY | |
| alias graph="graph-easy" # Example: echo '[a],[c]->[b]' | graph --as=boxart | |
| alias pn="pnpm" # Example: pn i (install packages from package.json) |
| tap "facebook/fb" | |
| tap "ggozad/formulas" | |
| tap "heroku/brew" | |
| tap "homebrew/bundle" | |
| tap "homebrew/cask-fonts" | |
| tap "homebrew/services" | |
| tap "lokalise/cli-2" | |
| tap "mongodb/brew" | |
| tap "oven-sh/bun" | |
| brew "act" |