Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -e
set -x
#{
#date
export zabbixemailto=$1
export zabbixsubject=$2
export zabbixbody=$3
slack_web_hook_url=https://hooks.slack.com/services/#####/#####/##########
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/XXXX/XXXXX/XXXXXX';
const slack_req_opts = url.parse(slack_url);
const slack_channel = '@user_name'; //or channel name
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
exports.handler = function(event, context, callback) {
@jarosite
jarosite / public_enc_example.sh
Created November 21, 2019 16:32 — forked from thinkerbot/public_enc_example.sh
Public-key encryption example using OpenSSL
#!/bin/bash
#
# Public-Key Encryption and Decryption
# * http://www.openssl.org/
# * http://barelyenough.org/blog/2008/04/fun-with-public-keys/
#
# Mac OS X 10.6.4
# OpenSSL 0.9.8l 5 Nov 2009
# Generate keys