Skip to content

Instantly share code, notes, and snippets.

View pedrojimenez's full-sized avatar

Pedro Jiménez Solís pedrojimenez

  • Voicemod
  • Cáceres
View GitHub Profile
## Change remote origin
git remote set-url origin git://new.url.here
git remote set-url origin git@comicteca.plan.io:comicteca-comicteca.comicteca_new.git
## Rename a Branch:
git branch -m old_branch new_branch
git push origin :old_branch
git push --set-upstream origin new_branch
@pedrojimenez
pedrojimenez / gist:a21b94178366d5ffa8a4c8c111e6611c
Created June 6, 2016 06:49 — forked from mdisec/gist:b0d44cc14e4c4c10cd64
Kibana with Nginx Reverse Proxy + SSL + HTTP Auth
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:443/ instead of
# http://FQDN:9200
@pedrojimenez
pedrojimenez / influxdb-grafana-howto.sh
Created November 10, 2015 19:42 — forked from otoolep/influxdb-grafana-howto.sh
Shell script to download, and configure, InfluxDB, nginx, and Grafana
#!/bin/bash
# Check out the blog post at:
#
# http://www.philipotoole.com/influxdb-and-grafana-howto
#
# for full details on how to use this script.
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname
INFLUXDB_DATABASE=test1
define host{
name generic-host
# Checking part
check_command check_host_alive
max_check_attempts 1
check_interval 1
retry_interval 1
# Check every time
Ping from Mongo and Dummy02 down
Http from Dummy01 down
2014-11-17 17:01:09,698 [1416240069] HOST NOTIFICATION: pedroC1;dummy02;DOWN;notify-host-by-email;CRITICAL - 192.168.122.195: rta nan, lost 100%
2014-11-17 17:01:41,786 [1416240101] SERVICE NOTIFICATION: pedroC1;dummy01;Http;CRITICAL;notify-service-by-email;Connection refused
2014-11-17 17:02:01,843 [1416240121] HOST NOTIFICATION: admin;mongo master 2 U;DOWN;notify-host-by-email;CRITICAL - 192.168.122.239: rta nan, lost 100%
2014-11-17 17:04:09,193 [1416240249] HOST NOTIFICATION: pedroC1;dummy02;DOWN;notify-host-by-email;CRITICAL - 192.168.122.195: rta nan, lost 100%
define host{
use generic-host,http
host_name dummy01
display_name KVM_VM_01
alias KVM_VM_01_ALIAS
address 192.168.122.246
hostgroups mysql
# Check every time
active_checks_enabled 1
# --------------------------------------------------------------------- #
# Contacts
# --------------------------------------------------------------------- #
define contact{
use generic-contact
contact_name pedroC1
email pedroC1@localhost
pager 0600000000 ; contact phone number
password admin
is_admin 1
# --------------------------------------------------------------------------------------- #
# Host Escalations:
# --------------------------------------------------------------------------------------- #
define escalation{
host_name dummy01
first_notification 1
last_notification 5
notification_interval 5
contact_groups C1
}