Step 1
If any version of postman is installed we need to remove it
sudo rm -rf /opt/PostmanStep 2
| #!/bin/env ruby | |
| require "fileutils" | |
| model = nil | |
| client = nil | |
| use_openai = ENV["OPENAI_ACCESS_TOKEN"] | |
| client, model = if use_openai |
| class MyTest | |
| include Mini::Unit | |
| def test_foo | |
| assert(2, 1) | |
| end | |
| end | |
| MyTest.run! |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Color Space</key> | |
| <string>sRGB</string> | |
| <key>Blue Component</key> | |
| <real>0.25882352941176473</real> |
| # Assumes the database container is named 'db' | |
| DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
| DB_HOSTNAME=db | |
| DB_USER=postgres | |
| LOCAL_DUMP_PATH="path/to/local.dump" | |
| docker-compose up -d db | |
| docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
| docker-compose stop db |
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| @token = '' | |
| def list_files | |
| ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
| params = { | |
| token: @token, |
| # config/routes.rb | |
| resources :documents do | |
| scope module: 'documents' do | |
| resources :versions do | |
| post :restore, on: :member | |
| end | |
| resource :lock | |
| end | |
| end |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| ARCHFLAGS="-arch x86_64" gem install mysql2 -- –with-mysql-config=/usr/local/bin/mysql_config |
| namespace :db do | |
| require "sequel" | |
| Sequel.extension :migration | |
| DB = Sequel.connect(ENV['DATABASE_URL']) | |
| desc "Prints current schema version" | |
| task :version do | |
| version = if DB.tables.include?(:schema_info) | |
| DB[:schema_info].first[:version] | |
| end || 0 |