Skip to content

Instantly share code, notes, and snippets.

View icalvete's full-sized avatar
🎯
Focusing

Israel Calvete icalvete

🎯
Focusing
  • Fluzo
  • Madrid
View GitHub Profile
rabbitmqctl eval '{ok, Q} = rabbit_amqqueue:lookup(rabbit_misc:r(<<"/">>, queue, <<"aliveness-test">>)), rabbit_amqqueue:delete_crashed(Q).'
@icalvete
icalvete / README.md
Created August 5, 2018 19:11
How To Create Your Own SSL Certificate Authority For Local HTTPS Development

How To Create Your Own SSL Certificate Authority For Local HTTPS Development

Warning

To use this self signed certificate, you need to add CA.pem into any browser certificate store

Warning

If v3.ext it's no used, some browers fail

@icalvete
icalvete / clean.sh
Last active January 2, 2018 16:39
Clean Vagrant box berofe packing
#!/bin/bash
cat - << EOWARNING
WARNING: This script will fil up your left over disk space.
DO NOT RUN THIS WHEN YOUR VIRTUAL HD IS RAW!!!!!!
You should NOT do this on a running system.
This is purely for making vagrant boxes damn small.
Press Ctrl+C within the next 10 seconds if you want to abort!!
#!/bin/bash
aws rds modify-db-parameter-group \
--db-parameter-group-name $1 \
--parameters="ParameterName=character_set_server,ParameterValue=utf8,ApplyMethod=pending-reboot" \
--parameters="ParameterName=collation_server,ParameterValue=utf8_general_ci,ApplyMethod=pending-reboot" \
--parameters="ParameterName=key_buffer,ParameterValue=128M,ApplyMethod=pending-reboot" \
--parameters="ParameterName=tmp_table_size,ParameterValue={DBInstanceClassMemory/16},ApplyMethod=pending-reboot" \
--parameters="ParameterName=max_heap_table_size,ParameterValue={DBInstanceClassMemory/16},ApplyMethod=pending-reboot" \
--parameters="ParameterName=query_cache_type,ParameterValue=1,ApplyMethod=pending-reboot" \
@icalvete
icalvete / gist:b4aec02a2b96119517d7f6b219a8bb25
Created September 12, 2016 14:47
Check_MK. Notify by Pushover
#!/usr/bin/python
# Notify by Pushover
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@icalvete
icalvete / docker-log.sh
Last active September 18, 2015 19:02 — forked from yarcowang/docker-log.sh
simple bash script to show log for a docker image
#!/usr/bin/env bash
DOCKER=`which docker`
usage()
{
echo "Usage: $(basename $0) [-l num] IMAGE"
exit 0
}
@icalvete
icalvete / installing_ruby_on_rails_ubuntu_trusty.sh
Last active December 30, 2018 14:53
How To Install Ruby on Rails with rbenv on Ubuntu 14.04
#!/bin/bash
# For https://www.coursera.org/learn/ruby-on-rails-intro/home/welcome
#
# Based on https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04
sudo apt-get update -y
sudo apt-get --ignore-missing install build-essential git git-core curl openssl libssl-dev libcurl4-openssl-dev zlib1g zlib1g-dev libreadline-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev libsqlite3-0 sqlite3 libxml2-dev libxslt1-dev python-software-properties libffi-dev libgdm-dev libncurses5-dev automake autoconf libtool bison postgresql postgresql-contrib libpq-dev pgadmin3 libc6-dev nodejs -y
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
@icalvete
icalvete / bitbucket_tools
Last active August 29, 2015 14:20
Bitbucket Tools
# bitbucket_tools
@icalvete
icalvete / lauch_jenkins_job.sh
Last active August 29, 2015 14:19
JENKINS GISTS
#!/bin/bash
JENKINS_URL=http://localhost:8080
JOB_NAME=$1
TOKEN=$2
crumb=`curl --insecure $JENKINS_URL/crumbIssuer/api/json`
crumb_final=`echo $crumb | awk -F "\":\"" {'print $2'} | awk -F "\"" {'print $1'}`
curl -H ".crumb:$crumb_final" --insecure \