Skip to content

Instantly share code, notes, and snippets.

View robacarp's full-sized avatar
🐢
Bacon//Pickle

Rob robacarp

🐢
Bacon//Pickle
View GitHub Profile
@davidcharlesweber
davidcharlesweber / ruby-jmeter test plan as rake file
Last active April 28, 2020 05:56
Gist for ruby-jmeter that will happily down a production rails app for you. Assumes that the application is using devise. Change thread count, duration and rampup to your needs. This will sign in as two different types of uses as a sample. Modify for your needs.
desc 'Generate and execute jmeter test plan'
task :generate_jmeter_plan do |t, args|
require 'ruby-jmeter'
generate_report
end
def generate_report
uri = URI('https://yourapp.com')
domain = uri.host
test do
@bcardiff
bcardiff / list-deps.cr
Last active March 9, 2024 17:57
List binary dependencies to build a minimal docker image from scratch
unless ARGV.size > 0
puts " Missing executable file argument"
puts " Usage (in a Dockerfile)"
puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable"
exit 1
end
executable = File.expand_path(ARGV[0])
unless File.exists?(executable)
@mems
mems / gist:5301297
Last active February 23, 2022 13:12
How to convert a (simple) SWF to PDF

Convert (simple) SWF to PDF

In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.

It can convert SWF, PDF or image to SWF, PDF, ebook or image.

For discard downscaling for rasterized image (default: 72dpi) we use the provided by @m-p-y: add -r attribute to increase maxdpi

Requirements