Skip to content

Instantly share code, notes, and snippets.

View altmas5's full-sized avatar
๐ŸŠ

Jorge Vallecillo altmas5

๐ŸŠ
View GitHub Profile
@math280h
math280h / delete_iam_user.sh
Created February 7, 2022 17:56 — forked from kgmoore431/delete_iam_user.sh
Delete an IAM user with AWS CLI
#!/bin/bash
profile="$1"
user_name="$2"
echo "Removing user: ${user_name}"
echo "Deleting Access Keys:"
keys=("$(aws iam list-access-keys --user-name "${user_name}" --profile "${profile}" | jq -r '.AccessKeyMetadata[] | .AccessKeyId')")
if [[ "${#keys}" -gt "0" ]]; then
@Barry-Fisher
Barry-Fisher / digital-ocean-backup-prune.sh
Last active January 7, 2019 15:19
digital-ocean-backup-prune.sh
#!/bin/bash
# Copyright: 2017 Barry Fisher
# LICENSE: MIT - https://opensource.org/licenses/MIT
# BACKGROUND:
# Digital Ocean Spaces doesn't currently support automatic
# deletion of objects/directories after a specified time period which
# makes it difficult to use Spaces for backup purposes.
# This script can be run as a cron task (or similar) to inspect a
@kamermans
kamermans / zabbix_v3_2_template_percona_mysql_server.xml
Created March 24, 2017 18:05
Percona Monitoring Plugins MySQL Template for Zabbix 3.2
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<date>2017-03-24T18:03:00Z</date>
<graphs>
<graph>
<graph_items>
<graph_item>
<calc_fnc>2</calc_fnc>
<color>157419</color>
<drawtype>1</drawtype>
#!/bin/sh
# CONFIGURATION
# 1. Go to @botfather and create a bot and use it's auth token as bot_token value
# 2. Create test channel, believe me, you need it
# 3. Set some url for your test channel
# 4. Add your bot to both channels, set their names in variables
# USAGE
# 1. Copy your markdown-formatted message into OS clipboard (Cmd+C)
@rickheil
rickheil / 00-graylog-proxy
Last active August 29, 2021 11:43
nginx configuration for graylog reverse proxy, HTTPS forced
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name graylog.example.com;
@dayreiner
dayreiner / icinga2_check_wmi_plus.conf
Created June 11, 2015 21:19
An example check_wmi_plus configuration for Icinga2. Check_wmi_plus (http://www.edcint.co.nz/checkwmiplus/) is a clientless plugin for monitoring Windows systems via WMI with Nagios and other monitoring platforms.
object CheckCommand "check_wmi" {
import "plugin-check-command"
command = [ PluginDir + "/check_wmi_plus.pl" ]
arguments = {
"--inidir" = "$wmi_inidir$"
"-H" = "$host.name$"
"-A" = "$wmi_authfile_path$"
"-m" = "$check_mode$"
"-s" = "$wmi_submode$"
@crashdump
crashdump / Template Freeswitch.xml
Created December 4, 2013 16:02
Freeswitch - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-04T16:01:36Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@huksley
huksley / graylog2-wipe.sh
Created May 16, 2013 10:08
Clean all data in graylog2 without deleting settings, with full restart
#!/bin/sh
service elasticsearch stop
service graylog2-server stop
killall -9 java
service apache2 stop
rm -Rf /opt/elasticsearch/data/*
# IF YOU HAVE AUTH USE THIS LINE - mongo graylog2 --eval "db.auth('graylog2', 'PASSWORD'); db.message_counts.remove();"
mongo graylog2 --eval "db.message_counts.remove();"
service elasticsearch start
service graylog2-server start
@cgarvey
cgarvey / pwd.php
Last active September 22, 2021 09:40
Utility PHP file to use WordPress' password utility to generate a hashed (and salted) version of a typed password. Why? So you can easily generate passwords for use in MySQL scripts / SQL command line, like resetting passwords or adding new users.
<?php
/*
Author
======
Author: Cathal Garvey.
Website: http://cgarvey.ie/
Help/Details Page: http://cgarvey.ie/blog/archive/2013/01/23/manually-generating-salted-hashed-wordpress-passwords/
Copyright