#!/bin/bash | |
## | |
## New IP login notification script | |
## 2009-11-20 00:28 Samuele ~redShadow~ Santi | |
## 2018-06-04 12:53 ElliotNB | |
## 2018-10-17 17:55 ElliotNB - bug fixes for non-interactive sessions and `sudo su` commands | |
## Licensed under GPL | |
## | |
## This script will email the contact specified below whenever | |
## a user logs into the system from a new IP address. The email will contain the |
/* Usage: $.selectorCache('#element') | |
* or to refresh cache: $.selectorCache('#element', true) | |
* | |
* Credit: https://ttmm.io/tech/selector-caching-jquery/ | |
*/ | |
(function($){ | |
var debug = false; | |
function SelectorCache() { | |
var collection = {}; |
#!/usr/bin/env bash | |
##### | |
# Script to install postfix | |
##### | |
DOMAIN="example.com" | |
EMAIL="[email protected]" | |
PASSWORD="example.com1*" |
#Installing configuring Postfix/Dovecot/Spamassassin/Roundcube
I've documented the steps in short to help me reproduce all the steps. Published it here for improvement and as a reference for others. Of course feel free to comment to improve this document.
This Gist is quite big and not all details are fully explained. But if you're going to run a mailserver you should be able to fill in the missing parts. The most important are covered. But be sure to read up to understand the meaning of all the stuff you configure. Since I used a lot of references of other sources (See at the end) I left out a lot of explanation in this document.
Don't forget that I'm not a Postfix/Dovecot/Spamassasin pro either. I just got it working the way I wanted to.
- Used Ubuntu 12.04 LTS.
- Set a root password.
This script can be used in conjunction with the ISPmail tutorial and the Roundcube autoreply plugin
Create the following table in the database where you created the tables from the ISPmail tutorial.
// Add a getElementsByClassName function if the browser doesn't have one | |
// Limitation: only works with one class name | |
// Copyright: Eike Send http://eike.se/nd | |
// License: MIT License | |
if (!document.getElementsByClassName) { | |
document.getElementsByClassName = function(search) { | |
var d = document, elements, pattern, i, results = []; | |
if (d.querySelectorAll) { // IE8 | |
return d.querySelectorAll("." + search); |
// Original code from http://css-tricks.com/examples/FluidWidthYouTube/iframe.php | |
$(function() { | |
// find all videos | |
var allVideos = $("iframe[src^='http://www.youtube.com']"), | |
// The thing that is fluid width | |
body = $("body"), |
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |