Skip to content

Instantly share code, notes, and snippets.

View unleashed's full-sized avatar
🗣️

Alejandro Martinez Ruiz unleashed

🗣️
View GitHub Profile
@unleashed
unleashed / limits.sh
Last active September 16, 2020 14:59
A script complementary to the explanation of why you can get over limits when you try 5 hits/minute in Apisonator
#!/bin/bash
# Set up a service with an application using user key, and add a limit on a metric for a low amount of hits, ie. 5.
# Then fill in the defaults below and call this script this way (note you can override any default when invoking it):
#
# For serial calls: $ NUM_REQUESTS=8 ./limits.sh
# For parallel calls: $ PARALLEL=y NUM_REQUESTS=8 ./limits.sh
# For best results in parallel calls, set FILE=test such as:
# $ FILE=test PARALLEL=y NUM_REQUESTS=8 ./limits.sh
#
# You can also use SLEEP=0.1 to see effects adding a bit of time between requests (useful when in PARALLEL).
@unleashed
unleashed / bundle-package.sh
Last active February 16, 2021 08:18
Bundler + rubygems packaging code execution
3scale/r/lolo via 💎 v2.7.2
❯ cat Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
# lala, lele, lulu and this Gemfile contain code to write <gemname>-gemfile or <gemname>-gemspec
# depending on whether a Gemfile or a <gem>.gemspec gets executed.
File.open 'lolo-gemfile', 'w' do |f|
f.write 'lolo'