rails new your_app_name --database=postgresql --skip-jbuilder --css=tailwindcd your_app_name
| # get your RAILS_MASTER_KEY from cat config/credentials/development.key | |
| # get your SECRET_KEY_BASE from cat tmp/local_secret.txt | |
| # save BOTH as env because Secrets are only available during setup | |
| # https://developers.openai.com/codex/cloud/environments#environment-variables-and-secrets | |
| apt-get update | |
| apt-get install -y postgresql postgresql-contrib libpq-dev | |
| sudo service postgresql start | |
| sudo -u postgres createuser --superuser root | |
| sudo -u postgres psql -c "ALTER ROLE root LOGIN;" |
| --- | |
| alwaysApply: true | |
| --- | |
| # Command Line Rejection List | |
| ## Rails command RejectList | |
| - rails server (do not ever run rails console) | |
| - rails console (do not ever run rails console) |
| #!/usr/bin/env ruby | |
| # csv_to_schema.rb | |
| # Usage: ruby csv_to_schema.rb path/to/file.csv table_name | |
| # Prints a suggested Rails migration and an example seeds.rb importer (Postgres COPY). | |
| require "csv" | |
| require "time" | |
| require "date" | |
| abort("Usage: ruby #{__FILE__} path/to/file.csv table_name") unless ARGV.size == 2 |
| business = Business.find(1) | |
| client = business.mws | |
| subscriptions = client.subscriptions.list_subscriptions(VDBMWS::SELLER_MARKETPLACE_US).parse.dig("SubscriptionList", "member") | |
| subscriptions.pretty | |
| subscriptions.each do |sub| | |
| sqs_queue_url = sub.dig("Destination", "AttributeList", "member", "Value") | |
| notif_type = sub.dig('NotificationType') | |
| Rails.logger.info("client.subscriptions.delete_subscription(#{notif_type}, #{sqs_queue_url}, #{VDBMWS::SELLER_MARKETPLACE_US})") | |
| puts client.subscriptions.delete_subscription(notif_type, sqs_queue_url, VDBMWS::SELLER_MARKETPLACE_US).parse |
| #!/bin/bash | |
| # Cleanup product images | |
| # This will convert images from JPG to PNG and replace the white | |
| # background with transparent one. | |
| # | |
| # SEEDED GPT4 a copy of the script from http://tech.natemurray.com/2007/12/convert-white-to-transparent.html | |
| # Set source folder and extension | |
| SRC_EXT=jpg |
| import scrape from 'website-scraper'; // only as ESM, no CommonJS | |
| const options = { | |
| urls: ['https://www.something.com'], | |
| recursive: true, | |
| directory: '/public', | |
| prettifyUrls: true, | |
| ignoreErrors: true, | |
| requestConcurrency: 4, | |
| subdirectories: [ | |
| {directory: 'img', extensions: ['.jpg', '.png', '.svg']}, |
| ffmpeg -i dockyard-diagonal.mp4 -i ship-up.mp4 -i dockyard-up.mp4 -i ship-pan.mp4 -i shipping-cranes.mp4 \ | |
| -filter_complex "[0:v] [1:v] [2:v] [3:v] [4:v] | |
| concat=n=5:v=1:a=0 [vv] " \ | |
| -map "[vv]" mergedvideo.mp4 |
| /* | |
| * MiniPreview v0.9 | |
| * | |
| * @author Will Boyd | |
| * Shared by Codegena | |
| */ | |
| (function($) { | |
| var PREFIX = 'mini-preview'; | |
| 8:33:29 AM: Build ready to start | |
| 8:33:31 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal) | |
| 8:33:31 AM: build-image tag: v4.10.1 | |
| 8:33:31 AM: buildbot version: aa4e1c51618610360476c8cb99b22ac3191f186e | |
| 8:33:31 AM: Fetching cached dependencies | |
| 8:33:31 AM: Failed to fetch cache, continuing with build | |
| 8:33:31 AM: Starting to prepare the repo for build | |
| 8:33:31 AM: No cached dependencies found. Cloning fresh repo | |
| 8:33:31 AM: git clone https://github.com/blairanderson/kw-perm-builder | |
| 8:33:31 AM: Preparing Git Reference refs/heads/main |