A simple ruby/http client for Basecamp 4.
Getting an oauth 2 token for basecamp is no fun.
Try this: https://github.com/pcreux/doorkeeper-sinatra-client-for-basecamp
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |
| // Display a developer-friendly error message when Turbo Frame fails to load. | |
| if (process.env.NODE_ENV === 'development') { | |
| document.addEventListener('turbo:frame-missing', async function (event) { | |
| event.preventDefault(); | |
| const frame = event.target; | |
| const response = event.detail.response; | |
| const frameId = frame.id; | |
| const url = response?.url || frame.src; |
| module ForeignKeyHelpers | |
| # Add a foreign key constraint binding :table :column to the 'id' column of the target_table | |
| # | |
| # By default, a column called 'user_id' will be binded to the column 'id' of the | |
| # table 'users' via a foreign key called 'fk_:table_:column_:target_table'. | |
| # You can override the default behaviour passing extra attributes :target_table, | |
| # :target_column and :constraint_name. | |
| def add_foreign_key(table, column, args = {}) | |
| args = args.clone | |
| target_table = args.delete(:target_table) || column.to_s.gsub('_id', '').pluralize |
| #!/usr/bin/env ruby | |
| # Generate a dbdiagram for dbdiagram.io from a dbt project. | |
| # | |
| # Usage: | |
| # 1. Run `dbt docs generate` first. | |
| # 2. Run `dbt_to_dbdiagram.rb` | |
| # 3. Paste the output in https://dbdiagram.io/ | |
| require 'yaml' | |
| require 'json' |
| #!/usr/bin/env ruby | |
| # Run commands in parallel, print the output with different colors, | |
| # and provide a summary. | |
| COMMANDS = [ | |
| "curl -v www.google.com", | |
| "curl -v www.yahoo.com", | |
| "dig www.google.com", | |
| "hoo", |
| #!/usr/bin/env ruby | |
| # Copy a heroku app (buildpacks, add-ons, labs, config, users). | |
| # This script is idempotent so it can run against an existing app. | |
| # | |
| # Usage: | |
| # $> clone-heroku-app source-app target-app | |
| require 'json' |
| #!/usr/bin/env ruby | |
| # Jabber-SH — SH console via XMPP/Jabber (GTalk) | |
| # | |
| # Jabber-SH allows you to administrate a remote computer via a command line | |
| # through a Jabber client. It’s like SSH via GoogleTalk! :) | |
| # This is just a hack but it might be usefull sometime to run basic commands | |
| # on a machine that is not accessible via ssh. | |
| # | |
| # Philippe Creux. pcreux/AT/gmail/DOT/com |
A simple ruby/http client for Basecamp 4.
Getting an oauth 2 token for basecamp is no fun.
Try this: https://github.com/pcreux/doorkeeper-sinatra-client-for-basecamp