View Output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"=== Memory when using `try` ===" | |
Total allocated: 40 bytes (1 objects) | |
Total retained: 0 bytes (0 objects) | |
allocated memory by gem | |
----------------------------------- | |
40 other | |
allocated memory by file | |
----------------------------------- |
View config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
orbs: | |
aws-cli: circleci/aws-cli@0.1.13 | |
jobs: | |
test: | |
parallelism: 1 | |
working_directory: ~/src | |
docker: | |
- image: circleci/ruby:2.6-node-browsers | |
environment: |
View publish_client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Clean slate | |
echo "Cleaning up old assets and packs..." | |
rm -rf public/assets public/packs | |
# Precompile assets for production | |
echo "Precompiling assets..." | |
bundle exec rake assets:precompile RAILS_ENV=production PUBLISH_CLIENT=true |
View benchmark.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'axlsx' | |
require 'rubyXL' | |
require 'memory_profiler' | |
rows = 1_000 | |
columns = 20 | |
report = MemoryProfiler.report do |
View memory.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_memory_usage | |
memory_before = `ps -o rss= -p #{Process.pid}`.to_i | |
yield | |
memory_after = `ps -o rss= -p #{Process.pid}`.to_i | |
puts "Memory: #{((memory_after - memory_before) / 1024.0).round(2)} MB" | |
end |
View bx.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'net/http' | |
require 'json' | |
require 'yaml' | |
unless ARGV.count == 0 || ARGV.count == 1 | |
puts "Usage #{$0} [--mappings]" | |
exit |