Skip to content

Instantly share code, notes, and snippets.

View coccoinomane's full-sized avatar
🎯
Focusing

coccoinomane coccoinomane

🎯
Focusing
View GitHub Profile
#!/usr/bin/env php
<?php
/**
* List all folders in an IMAP account, together with
* number of unread messages and number of total messages
* in each folder.
*
* In order to work, this script requires the presence of a
#!/bin/sh
#
# Git hook script to remove the annoying Icon? files created
# by Google Drive.
n_icon_files=`find . -name Icon? | grep -c /`
if [ $n_icon_files != "0" ]; then
echo "Will delete $n_icon_files files 'Icon?' generated by Google Drive\n"
find . -name Icon? -exec rm -f {} \;
fi
<?php
/**
* Script (PHP & Javascript) to send category information from Wordpress
* to Universal Google Analytics (GA).
*
* The Wordpress category is passed using the Content Grouping feature of
* GA, to the contentGroup1 group.
*
* If the function is_product() is defined, the script assumes the website
<!-- #!/usr/bin/env php -->
<!-- ^ Uncomment to launch from shell -->
<?php
/**
* Script to count the number of files in a directory and in
* all its subdirectories.
*
* The function returns an array with two entries: the total number