Skip to content

Instantly share code, notes, and snippets.

View saviour123's full-sized avatar

Saviour Gidi saviour123

View GitHub Profile
@joshRpowell
joshRpowell / ruby2.5.0-command
Last active January 11, 2020 07:33
rvm install ruby 2.5.0 on macOS 10.13.2
•100% [I] ➜ rvm get master && rvm list known
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/jpowell/.rvm/archives/rvm-installer.asc
gpg: Signature made Sat Sep 9 15:49:18 2017 EDT
gpg: using RSA key E206C29FBF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <[email protected]>" [unknown]
gpg: Note: This key has expired!
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
@lakshmantgld
lakshmantgld / slackWebhook.md
Last active February 7, 2024 03:57
Configuring slack webhook

A Webhook, in simple terms, is a user-defined HTTP callback. It is a mechanism for the system to notify you about an event. In our case, we need to send messages to a particular channel in slack. Slack calls in Incoming Webhook. It is a mechanism to send messages to your Slack Channel from external sources. These external sources could be any application or service that is capable of sending a JSON payload over HTTP into a Slack Channel. Each Channel will be identified by a unique Incoming Webhook URL to which you can post the message from outside. This configuration is done via the Integrations for your channel.

Steps to create a incoming webhook in Slack:

  1. Naviagte to the Incoming Webhook URL. Click the hyper link incoming webhook integration below the heading Incoming Webhooks.
  2. You will be asked to enter your team URL, followed by your slack credentials.
  3. Once you have completed the above step, you will see the wizard kind of webpage to
@Chengings
Chengings / .editorconfig
Last active April 2, 2025 09:27
Cheatsheets
trim_trailing_whitespace = true
@ruanbekker
ruanbekker / python_mailer_smtplib.py
Created July 26, 2017 15:25
Python SMTP Mailer using Amazon SES (smtplib)
import sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
name = "Ruan"
from_address = "[email protected]"
to_address = "[email protected]"
subject = "Test"
@johnstanfield
johnstanfield / agent.conf
Last active August 1, 2023 03:33
Configuration to make OSSEC HIDS watch fail2ban.log and alert on fail2ban actions
<!-- add this to /var/ossec/etc/shared/agent.conf -->
<localfile>
<log_format>syslog</log_format>
<location>/var/log/fail2ban.log</location>
</localfile>
const makeRequest = async () => {
const value1 = await promise1()
const value2 = await promise2(value1)
return promise3(value1, value2)
}
@devigned
devigned / nginx.conf
Created February 15, 2017 17:30
Nginx config for Rails puma
upstream puma {
server unix:///home/deploy/apps/level0/shared/tmp/sockets/level0-puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /home/deploy/apps/level0/current/public;
access_log /home/deploy/apps/level0/current/log/nginx.access.log;
# wget https://gist.githubusercontent.com/waja/d9e176f712ae6a6e4442486df80a13ba/raw/deploy_unattended-upgrades.sh -O /tmp/a && sh /tmp/a
apt-get -y install unattended-upgrades needrestart && \
cat > /etc/apt/apt.conf.d/10periodic <<EOF
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
EOF
sed -i 's#// "o=Debian,n=jessie"# "o=Debian,n=jessie"#' /etc/apt/apt.conf.d/50unattended-upgrades && \
sed -i 's#// "o=Debian,n=jessie-updates"# "o=Debian,n=jessie-updates"#' /etc/apt/apt.conf.d/50unattended-upgrades && \
@chmouel
chmouel / nginx-ssl-configuration.conf
Created September 19, 2016 05:54
nginx-ssl-proxy-pass-configuration
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name blog.chmouel.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/blog.chmouel.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/blog.chmouel.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@travisjeffery
travisjeffery / influxdb-setup.md
Last active March 17, 2024 15:38
Guide to setting up InfluxData's TICK stack

Guide to setting up InfluxData's TICK stack

InfluxData's T.I.C.K. stack is made up from the following components:

Component Role
Telegraf Data collector
InfluxDB Stores data
Chronograf Visualizer