This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Pops open a new window given the identifier (name), url, width, height, and | |
optional additional options (as normally passed to window.open()), centered | |
on the screen. Additionally, it will not open more than one instance of each | |
identifier. | |
Amalgamation of: | |
https://developer.mozilla.org/en-US/docs/Web/API/Window.open "Best Practices" | |
http://stackoverflow.com/questions/4068373/center-a-popup-window-on-screen | |
"Single/Dual Monitor Function" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A.B. Carroll [email protected] | |
# File location in my setup: | |
# /media/zebra/launch-zebra-backup | |
# chmod +x /media/launch-zebra-backup | |
date > /media/zebra/last-backup.start | |
date >> /media/zebra/all-backup.start | |
rsync -avh --delete --progress /svn-migrate /media/zebra/ | |
rsync -avh --delete --progress --exclude=/apps/php_errors.log /apps /media/zebra/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expiration and compression | |
# This will generally improve gtmetrix (yslow/page speed) score at no expense. | |
ExpiresActive On | |
ExpiresByType image/x-icon "access plus 6 weeks" | |
ExpiresByType image/png "access plus 6 weeks" | |
ExpiresByType image/jpg "access plus 6 weeks" | |
ExpiresByType image/gif "access plus 6 weeks" | |
ExpiresByType image/jpeg "access plus 6 weeks" | |
ExpiresByType application/x-shockwave-flash "access 6 weeks" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array functions: | |
array_search $needle, $haystack | |
in_array $needle, $haystack | |
String functions: | |
strchr $haystack, $needle | |
stripos $haystack, $needle | |
stristr $haystack, $needle | |
strpos $haystack, $needle | |
strrchr $haystack, $needle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Load predis object into $redis | |
here */ | |
$out_file = 'REDIS-DUMP.txt'; | |
$fp = fopen($out_file, 'w+'); | |
echo "Starting... \n"; | |
echo "KEYS... "; | |
$objects = $redis->keys("*"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Copyright (c) 2013, Armond B. Carroll III, [email protected] | |
* This 'gist' (file) is distributed under the BSD 2-Clause License. | |
* | |
* This code will turn a function list into the inside part of a class, with | |
* the synopsis, and each member calling the original procedural style function. | |
* It was written to turn ncurses_* functions into a class. | |
* | |
* TO USE, load a text file into a file (ncurses.txt in this revision), with |
NewerOlder