Skip to content

Instantly share code, notes, and snippets.

@fduran
fduran / gist:1870429
Created February 20, 2012 18:15
Linux disk space email alert
#!/bin/bash
# www.fduran.com
# script that will send an email to EMAIL when disk use in partition PART is bigger than %MAX
# adapt these 3 parameters to your case
MAX=95
EMAIL=alert@example.com
PART=sda1
USE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1`
if [ $USE -gt $MAX ]; then
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@esfand
esfand / NginxRedirect.md
Last active March 21, 2024 07:12
Nginx Redirect

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@ludwigm
ludwigm / cec-commands.sh
Created May 30, 2014 21:09
CEC commands usable by raspberry pi
# libcec compile tutorial: http://nyxi.eu/blog/2013/04/15/raspbian-libcec/
# switch off TV
echo "tx 10 36" | cec-client -s
# switch on TV
echo "on 0" | cec-client -s
# or
echo "tx F0 36" | cec-client -s
<?php
/*
* This file an extension for the Monolog package that implements an AMQP handler based on
* the amqp library at https://github.com/videlalvaro/php-amqplib
*
* (c) Mike Preston <mike@technomonk.com>
*
*/
@tmornini
tmornini / gist:789d0cf3bccec2cdcf2c
Last active August 29, 2015 14:03
Subledger Getting Started
0) Live in-browser API docs (Swagger)
a) https://api.subledger.com
b) we recommend that you copy/paste all responses for future reference
1) Setup the system
a) Create an Identity via first API operation!
b) Enter key_id and secret in the Security credentials boxes in the upper-right corner of API docs
c) Create an org
d) Create a book
e) Create some accounts (Recommended: Cash, Payables, Shareholder Equity)
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
#!/usr/bin/env sh
if [ "$1" != "" ]; then
sBatchList=""
sBatchMessage="$3"
while IFS=, read col1 col2
do
sBatchList="$sBatchList $col1"
@slok
slok / amfirer.go
Last active November 11, 2021 06:10
Alertmanager alarm tester. Fire a custom alert to your alertmanager: https://github.com/prometheus/alertmanager
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"net/url"
@thehunmonkgroup
thehunmonkgroup / resources.md
Last active October 4, 2022 01:20
ClueCon 2017 presentation, building a WebRTC testing framework with open source tools