Rails 7.2 defaults:
Highscore.connection
# => #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x000000000080e8 env_name="development" role=:writing>With config.active_record.permanent_connection_checkout = :disallowed:
| { | |
| "agent": { | |
| "always_allow_tool_actions": true, | |
| "inline_assistant_model": { "provider": "copilot_chat", "model": "claude-3.7-sonnet" }, | |
| "default_view": "text_thread", | |
| "default_model": { "provider": "copilot_chat", "model": "claude-3.7-sonnet" }, | |
| }, | |
| "features": { "edit_prediction_provider": "none" }, | |
| "theme": "One Light", | |
| "buffer_font_family": "DejaVu Sans Mono", |
| module Element::Positionable | |
| extend ActiveSupport::Concern | |
| included do | |
| before_create :set_position | |
| before_update :reposition_before_update | |
| validates_numericality_of :position, greater_than_or_equal_to: 1, on: :update | |
| end |
| #!/bin/bash | |
| pushd ~/Applications/ # or wherever you install AppImages, they recommend here | |
| ./cursor.AppImage --appimage-extract && \ | |
| sed -i 's/,minHeight/,frame:false,minHeight/g' "squashfs-root/usr/share/cursor/resources/app/out/main.js" | |
| [ ! -f ./appimagetool* ] && { | |
| URL="https://github.com/AppImage/appimagetool/releases/download/continuous" | |
| wget $URL/appimagetool-$(uname -m).AppImage && chmod +x appimagetool* |
| #!/usr/bin/env bash | |
| # Abort sign off on any error | |
| set -e | |
| # Start the benchmark timer | |
| SECONDS=0 | |
| # Repository introspection | |
| OWNER=$(gh repo view --json owner --jq .owner.login) |
| const domObserver = new MutationObserver(() => { | |
| let rail = document.querySelector('div.p-tab_rail'); | |
| if (rail) { | |
| rail.remove(); | |
| let old_strip = document.querySelector('div.p-workspace_switcher_prototype div.p-control_strip') | |
| if (old_strip) { | |
| old_strip.remove() | |
| } | |
| let strip = document.querySelector('div.p-control_strip'); | |
| document.querySelector('div.p-workspace_switcher_prototype').appendChild(strip); |
| def red(text) | |
| "\033[31m#{text}\033[0m" | |
| end | |
| number_of_factories_to_analyze = 10 | |
| load_begin = Time.now | |
| stats = {} | |
| ActiveSupport::Notifications.subscribe("factory_bot.run_factory") do |_name, start, finish, _id, payload| | |
| execution_time_in_seconds = finish - start | |
| stats[payload[:name]] = stats[payload[:name]].to_f + execution_time_in_seconds |
| def red(text) | |
| "\033[31m#{text}\033[0m" | |
| end | |
| load_begin = Time.now | |
| # This will return slowest factories within the suite | |
| stats = {} | |
| ActiveSupport::Notifications.subscribe("factory_bot.run_factory") do |_name, start, finish, _id, payload| | |
| execution_time_in_seconds = finish - start |
| class ApplicationController < ActionController::Base | |
| include SetCurrentRequestDetails | |
| include SetCurrentTimeZone | |
| include Authenticate | |
| include ForgeryProtection | |
| include ErrorResponses | |
| include SetSentryUser |
| class Cractor | |
| def initialize(*args, &block) | |
| @inbox = Queue.new | |
| @outbox = Queue.new | |
| Thread.new do | |
| result = yield(self, *args) | |
| self.yield(result) | |
| end |