Skip to content

Instantly share code, notes, and snippets.

@hanksudo
hanksudo / stdev.js
Created July 18, 2013 10:02
Standard deviation(STDEV) with JavaScript
var stdev = function(arr) {
var n = arr.length;
var sum = 0;
arr.map(function(data) {
sum+=data;
});
var mean = sum / n;
@jonmaim
jonmaim / zip.php
Last active January 22, 2024 00:19
PHP script to remotely create zip archives of your FTP
<?php
/*
*
* This script will backup your web site by remotely archiving all files on the root FTP directory.
* It will work even if your web server is memory limited buy splitting zips in several arhive files it they are too many files.
* All zip files will be stored in a directory called temporary which must be writable.
*
* How to use it:
* - Place the script at the root of your FTP.