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
| /* Generated by Spinel AOT compiler */ | |
| #include "sp_runtime.h" | |
| /* sp_sym intern table */ | |
| #define SP_SYM_COUNT 118 | |
| static const char *const sp_sym_names[118] = {(&("\xff" "OK")[1]),(&("\xff" "ROW")[1]),(&("\xff" "DONE")[1]),(&("\xff" "sqlite3_open")[1]),(&("\xff" "str")[1]),(&("\xff" "ptr")[1]),(&("\xff" "int")[1]),(&("\xff" "sqlite3_close")[1]),(&("\xff" "sqlite3_exec")[1]),(&("\xff" "sqlite3_prepare_v2")[1]),(&("\xff" "sqlite3_step")[1]),(&("\xff" "sqlite3_finalize")[1]),(&("\xff" "sqlite3_reset")[1]),(&("\xff" "sqlite3_clear_bindings")[1]),(&("\xff" "sqlite3_column_int")[1]),(&("\xff" "sqlite3_column_text")[1]),(&("\xff" "sqlite3_column_count")[1]),(&("\xff" "sqlite3_column_name")[1]),(&("\xff" "sqlite3_errmsg")[1]),(&("\xff" "sqlite3_last_insert_rowid")[1]),(&("\xff" "long")[1]),(&("\xff" "sqlite3_changes")[1]),(&("\xff" "db_out")[1]),(&("\xff" "stmt_out")[1]),(&("\xff" "read_ptr")[1]),(&("\xff" "db_conn")[1]),(&("\xff" "opt")[1]),(&("\xff" "i")[1]),(&("\xff" "record")[1]),(&("\xff" "size")[1]),(&("\xff" " |
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
| /* Generated by Spinel AOT compiler */ | |
| #include "sp_runtime.h" | |
| /* sp_sym intern table */ | |
| #define SP_SYM_COUNT 119 | |
| static const char *const sp_sym_names[119] = {(&("\xff" "OK")[1]),(&("\xff" "ROW")[1]),(&("\xff" "DONE")[1]),(&("\xff" "sqlite3_open")[1]),(&("\xff" "str")[1]),(&("\xff" "ptr")[1]),(&("\xff" "int")[1]),(&("\xff" "sqlite3_close")[1]),(&("\xff" "sqlite3_exec")[1]),(&("\xff" "sqlite3_prepare_v2")[1]),(&("\xff" "sqlite3_step")[1]),(&("\xff" "sqlite3_finalize")[1]),(&("\xff" "sqlite3_reset")[1]),(&("\xff" "sqlite3_clear_bindings")[1]),(&("\xff" "sqlite3_column_int")[1]),(&("\xff" "sqlite3_column_text")[1]),(&("\xff" "sqlite3_column_count")[1]),(&("\xff" "sqlite3_column_name")[1]),(&("\xff" "sqlite3_errmsg")[1]),(&("\xff" "sqlite3_last_insert_rowid")[1]),(&("\xff" "long")[1]),(&("\xff" "sqlite3_changes")[1]),(&("\xff" "db_out")[1]),(&("\xff" "stmt_out")[1]),(&("\xff" "read_ptr")[1]),(&("\xff" "db_conn")[1]),(&("\xff" "opt")[1]),(&("\xff" "i")[1]),(&("\xff" "record")[1]),(&("\xff" "size")[1]),(&("\xff" " |
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
| /* Generated by Spinel AOT compiler */ | |
| #include "sp_runtime.h" | |
| /* sp_sym intern table */ | |
| #define SP_SYM_COUNT 112 | |
| static const char *const sp_sym_names[112] = {(&("\xff" "OK")[1]),(&("\xff" "ROW")[1]),(&("\xff" "DONE")[1]),(&("\xff" "sqlite3_open")[1]),(&("\xff" "str")[1]),(&("\xff" "ptr")[1]),(&("\xff" "int")[1]),(&("\xff" "sqlite3_close")[1]),(&("\xff" "sqlite3_exec")[1]),(&("\xff" "sqlite3_prepare_v2")[1]),(&("\xff" "sqlite3_step")[1]),(&("\xff" "sqlite3_finalize")[1]),(&("\xff" "sqlite3_column_int")[1]),(&("\xff" "sqlite3_column_text")[1]),(&("\xff" "sqlite3_column_count")[1]),(&("\xff" "sqlite3_column_name")[1]),(&("\xff" "sqlite3_errmsg")[1]),(&("\xff" "sqlite3_last_insert_rowid")[1]),(&("\xff" "long")[1]),(&("\xff" "sqlite3_changes")[1]),(&("\xff" "db_out")[1]),(&("\xff" "stmt_out")[1]),(&("\xff" "read_ptr")[1]),(&("\xff" "record")[1]),(&("\xff" "adapter")[1]),(&("\xff" "id")[1]),(&("\xff" "updated_at")[1]),(&("\xff" "created_at")[1]),(&("\xff" "verb")[1]),(&("\xff" "pattern")[1]),(&("\xff" "controller |
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
| /* Generated by Spinel AOT compiler */ | |
| #include "sp_runtime.h" | |
| /* sp_sym intern table */ | |
| #define SP_SYM_COUNT 110 | |
| static const char *const sp_sym_names[110] = {(&("\xff" "OK")[1]),(&("\xff" "ROW")[1]),(&("\xff" "DONE")[1]),(&("\xff" "sqlite3_open")[1]),(&("\xff" "str")[1]),(&("\xff" "ptr")[1]),(&("\xff" "int")[1]),(&("\xff" "sqlite3_close")[1]),(&("\xff" "sqlite3_exec")[1]),(&("\xff" "sqlite3_prepare_v2")[1]),(&("\xff" "sqlite3_step")[1]),(&("\xff" "sqlite3_finalize")[1]),(&("\xff" "sqlite3_column_int")[1]),(&("\xff" "sqlite3_column_text")[1]),(&("\xff" "sqlite3_column_count")[1]),(&("\xff" "sqlite3_column_name")[1]),(&("\xff" "sqlite3_errmsg")[1]),(&("\xff" "sqlite3_last_insert_rowid")[1]),(&("\xff" "long")[1]),(&("\xff" "sqlite3_changes")[1]),(&("\xff" "db_out")[1]),(&("\xff" "stmt_out")[1]),(&("\xff" "read_ptr")[1]),(&("\xff" "record")[1]),(&("\xff" "adapter")[1]),(&("\xff" "id")[1]),(&("\xff" "updated_at")[1]),(&("\xff" "created_at")[1]),(&("\xff" "verb")[1]),(&("\xff" "pattern")[1]),(&("\xff" "controller |
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
| <div id="<%= dom_id item %>"> | |
| <p class="my-5"> | |
| <strong class="block font-medium mb-1">Name:</strong> | |
| <%= item.name %> | |
| </p> | |
| <p class="my-5"> | |
| <strong class="block font-medium mb-1">Contents:</strong> | |
| <% if item.contents.attached? %> | |
| <% if item.contents.content_type.start_with? 'image/' %> |
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
| --- a/app/views/items/_item.html.erb | |
| +++ b/app/views/items/_item.html.erb | |
| @@ -6,7 +6,21 @@ | |
| <p class="my-5"> | |
| <strong class="block font-medium mb-1">Contents:</strong> | |
| - <%= link_to item.contents.filename, item.contents if item.contents.attached? %> | |
| + <% if item.contents.attached? %> | |
| + <% if item.contents.content_type.start_with? 'image/' %> | |
| + <img src=<%= item.contents.url %> alt="<%= item.contents.filename %>"> |
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
| m -rf drizzle-test | |
| mkdir drizzle-test | |
| cd drizzle-test | |
| echo "{}" > package.json | |
| npm install drizzle-orm pg | |
| npm install -D drizzle-kit @types/pg typescript | |
| echo "import { pgTable } from 'drizzle-orm/pg-core';" > test.ts | |
| npx tsc test.ts |
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
| # syntax = docker/dockerfile:1 | |
| FROM node:18-slim as base | |
| # Node app lives here | |
| WORKDIR /app | |
| COPY <<-"EOF" package.json | |
| { | |
| "dependencies": { |
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
| # syntax = docker/dockerfile:1 | |
| # Adjust NODE_VERSION as desired | |
| ARG NODE_VERSION=19.7.0 | |
| FROM node:${NODE_VERSION}-slim as base | |
| LABEL fly_launch_runtime="Remix/Prisma" | |
| # Remix/Prisma app lives here | |
| WORKDIR /app |
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
| rails new livedemo --css tailwind | |
| cd livedemo | |
| bin/importmap pin @flydotio/stimulus-live-elements@0.1.0 | |
| echo 'export { default } from "@rubys/stimulus-live-elements"' > app/javascript/controllers/live_elements_controller.js | |
| bin/rails generate controller demo | |
| echo 'Rails.application.routes.draw {root "demo#button"; post "demo/click"}' >> config/routes.rb | |
| cat <<-"EOF" > app/views/demo/_header.html.erb | |
| <%= turbo_frame_tag "header", class: "block bg-#{color}-400 mb-4" do %> | |
| <h1 class="font-bold text-4xl">Live button demo</h1> |
NewerOlder