Skip to content

Instantly share code, notes, and snippets.

View unleashed's full-sized avatar
👶
Parenting x2

Alejandro Martinez Ruiz unleashed

👶
Parenting x2
View GitHub Profile
@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'
@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 / gist-go
Last active April 25, 2019 14:07
Get GitHub Gist
#!/bin/bash
#
# gist-go - Get a Github Gist
# Copyright (c) 2019 Alejandro Martinez Ruiz <alex flawedcode org>
#
# Downloads latest version of files in a Github gist, optionally outputting them to stdout.
# Files will by default be written to the current working directory, unless you
# specify --stdout (or -o) as first parameter.
#
# Usage:
@unleashed
unleashed / maistra_apimgmt.sh
Last active June 18, 2019 13:28
Install Maistra on a CentOS/RHEL machine
#!/bin/bash
if test -x "$(pwd)/istiooc"; then
ISTIOOC=$(pwd)/istiooc
else
ISTIOOC=${HOME}/istiooc
fi
NAMESPACE=${NAMESPACE:-bookinfo}
DEPLOYMENT=${DEPLOYMENT:-productpage-v1}
@unleashed
unleashed / git-recommit-as
Created August 6, 2018 18:04
scripts that helped me rebase and opensource apisonator
#!/bin/bash
#
# This script receives a parameter, the revision from which to take
# the committer information, and applies that committer information
# to the current HEAD.
#
# N.B.: The machinery uses git commit --amend, so if you have staged
# changes you will add them to the commit! This is solvable, but not
# worth the effort.
@unleashed
unleashed / openpgp.txt
Created June 18, 2016 14:53
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:33e0ed94cc4d33000f56b35ace229595a73a83b0]
@unleashed
unleashed / openpgp.txt
Created June 18, 2016 14:53
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:33e0ed94cc4d33000f56b35ace229595a73a83b0]
@unleashed
unleashed / openpgp.txt
Created June 18, 2016 14:53
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:33e0ed94cc4d33000f56b35ace229595a73a83b0]
@unleashed
unleashed / gpgbackup.sh
Last active June 18, 2016 12:44
GnuPG key backup
#!/bin/sh
mkdir ./gpgbackup
gpg --export -a > ./gpgbackup/pubring.asc
gpg --export-secret-keys -a > ./gpgbackup/secring.asc
gpg --export-ownertrust -a > ./gpgbackup/ownertrust.asc
tar cvjf ./gpgbackup.tar.bz2 ./gpgbackup
rm -rf ./gpgbackup
gpg --symmetric --output ./gpgbackup.tar.bz2.crypt ./gpgbackup.tar.bz2
rm ./gpgbackup.tar.bz2
md5sum ./gpgbackup.tar.bz2.crypt > ./gpgbackup.tar.bz2.crypt.md5

Keybase proof

I hereby claim:

  • I am unleashed on github.
  • I am unleashed (https://keybase.io/unleashed) on keybase.
  • I have a public key whose fingerprint is 33E0 ED94 CC4D 3300 0F56 B35A CE22 9595 A73A 83B0

To claim this, I am signing this object: