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
| // 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; |
| #!/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", |
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
| init_config: | |
| # `datadog/prerun.sh` will inject instances below on boot | |
| instances: |
| #!/usr/bin/env ruby | |
| # Usage: ruby dbt-log-to-csv.rb PATH_TO_DBT_LOGS | |
| Model = Struct.new(:schema, :table, :rows_str, :size_str, :duration_str) do | |
| def rows | |
| rows = rows_str.to_f | |
| rows = case rows_str | |
| when /\d$/ | |
| rows |
| require 'active_model' | |
| require 'dry-struct' | |
| require 'benchmark/ips' | |
| require 'benchmark/memory' | |
| class AMUser | |
| include ActiveModel::Model | |
| include ActiveModel::Attributes | |
| attribute :id, :integer |
| results = [] | |
| queue = Queue.new | |
| mutex = Mutex.new | |
| THREAD_COUNT = 3 | |
| threads = Array.new(THREAD_COUNT) do | |
| Thread.new do | |
| while (value = queue.pop) |