Skip to content

Instantly share code, notes, and snippets.

View onfire4g05's full-sized avatar

Justin Osborne onfire4g05

View GitHub Profile
@onfire4g05
onfire4g05 / Move files older than X days
Created March 7, 2014 20:15
Will move files based on time specified, keeping directory structure
find . -mtime +1786 -type f -print0 | xargs -0 -I {} sh -c '
file="{}"
destination="/var/shares/primary/backup-images"
mkdir -p "$destination/${file%/*}"
mv "$file" "$destination/$file"'
@ck-on
ck-on / ocp.php
Last active May 18, 2024 22:35
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',