Skip to content

Instantly share code, notes, and snippets.

View jonmaim's full-sized avatar
🌍
Back in Europe!

Jon Maim jonmaim

🌍
Back in Europe!
View GitHub Profile
@jonmaim
jonmaim / zip.php
Last active July 30, 2024 09: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.
@jonmaim
jonmaim / gist:805601
Created February 1, 2011 08:46
Git checkout every file with changed file properties (run it in root git dir).
$ git status --porcelain --untracked-files=no | awk '{if ($1 == "M") print;}' | cut -d " " -f 3-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git diff --summary | cut -d " " -f 7-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git checkout
@jonmaim
jonmaim / gist:666042
Created November 7, 2010 10:02
usr.sbin.mysqld
We couldn’t find that file to show.