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.
#!/bin/bash | |
RESULT="$(ps -A | grep proftpd)" | |
if $( echo $RESULT | grep --quiet 'proftpd' ) | |
then | |
echo 'Service PROFTPD is fine, no need for action...' | |
else | |
service proftpd stop | |
service proftpd start |
/* | |
* Useful for forcing all transform functions defined in @keyframes to execute simultaneously | |
* Many (including myself until recently) doesn't know that transform functions defined | |
* into @keyframes doesn't play simultaneously | |
* but in reversed order of declaration | |
* | |
* More info about this issue: | |
* https://css-tricks.com/debugging-css-keyframe-animations/ | |
* | |
* USAGE |
/** | |
* $(element).triggerOnce('muCustomEvent') instead | |
* of $(element).trigger('muCustomEvent') | |
* when goal is to neutralize multiple event triggering | |
*/ | |
$.fn.triggerOnce = function(eventName){ | |
if (! this.data( 'triggered-' + eventName ) ) { | |
this.trigger(eventName).data( 'triggered-' + eventName, true ); | |
} | |
return this; |
/** | |
* jQuery contenteditablechanged | |
* | |
* Fires custom event named 'contenteditablechanged' when | |
* textcontent of element marked with contenteditable='true' | |
* changes. | |
* | |
* Usage: | |
* $('[contenteditable]').on('contenteditablechanged', function(e){ | |
* console.log(e); //-- Event properits |
/** | |
* | |
* Element wrapper, necessary | |
* for attaching custom user | |
* data to element. | |
* | |
* It acts like jQuery wrapper | |
* -creates an instance of wrapper | |
* with element as zero field | |
* providing access to `data` |
/* | |
* Find out what is that damn element with highest z-index, | |
* or simply get the z-index 'picture' of DOM | |
* | |
* USAGE: simply paste this in console, hit enter | |
*/ | |
var all = document.getElementsByTagName('*'), | |
allLength = all.length; | |
/** | |
* | |
* real3d detects support for csstransforms3d and gives | |
* result both to html classes and javascript property | |
* (just like Modernizr does) | |
* | |
* Unlike Modernizr, it's doing this non trivial test | |
* on real element inside real document's body, relaying | |
* on computated css transform property as distinctive | |
* factor for testing. |
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.
;(function(w,d){ | |
var fn=function(){ | |
var body = d.body || d.getElementsByTagName('body')[0]; | |
if(d.querySelectorAll) | |
var allimgs = d.querySelectorAll('img[data-src]'), allimgs_len = allimgs.length; | |
for(var i=0;i<allimgs_len;i++){ | |
allimgs[i].setAttribute('src', allimgs[i].getAttribute('data-src')); | |
} | |
} |
/@\s*?media\s*?\(\s*?(min|max)-(width|height)\s*?:\s*?(\d+)(px|em)\s*?\)\s*?{(.*)}/gms | |
/** | |
* Only basically tested. | |
* Should match min-max-width-height number px|em and following rules. | |
* Provides capturing groups to determinate condition alongside with css. | |
* | |
* Created with help of regex101 | |
* https://regex101.com/r/zA6fX2/1 |