This file contains 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
// Future enhancement, make animation steps arrays, to apply multiple simultaneous transitions to multiple elements | |
// | |
// animation elements: | |
// 0: number of tenths of a second after previous animation element | |
// 1: add or remove | |
// 2: classname | |
// 3: element identifier | |
// | |
const add = 1; | |
const remove = -1; |
This file contains 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
#!/bin/bash | |
databases=`mysql -h 127.0.0.1 -u root --batch --skip-column-names -e "SHOW DATABASES;" | grep -E -v "(information|performance)_schema"` | |
for db in $databases; do | |
echo "Dumping database: $db" | |
mysqldump -h 127.0.0.1 -u root --databases $db | head -n -1 > /root/Backups/`date +%d%H`.$db.sql | |
done | |
fdupes -rNdqio time /root/Backups |
This file contains 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 | |
// method from a CMS object | |
function build_page_twig(){ | |
libxml_use_internal_errors(TRUE); // this avoids errors thrown on HTML5 tags | |
// | |
// this section is cms-specific, could just pass in the json file name |
This file contains 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
#!/bin/sh | |
# | |
# create watches for each subfolder within the specified location (1 level deep) | |
# renames the uploaded files to avoid infinite loop | |
# | |
for d in $(find /home/peter/Dropbox/MiniDonkies/Donkeys -maxdepth 1 -type d) | |
do | |
( | |
if [ '/home/peter/Dropbox/MiniDonkies/Donkeys' != $d ]; then | |
echo "$d" |
This file contains 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
create temporary table good_address ( | |
`idAddress` int(11) NOT NULL, | |
`first_name` varchar(45) NOT NULL, | |
`last_name` varchar(45) NOT NULL, | |
`company_name` varchar(45) NOT NULL, | |
`address_1` varchar(50) NOT NULL, | |
`address_2` varchar(50) DEFAULT NULL, | |
`city` varchar(45) NOT NULL, | |
`state` varchar(45) DEFAULT NULL, | |
`country` varchar(5) NOT NULL, |
This file contains 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
window.originalSetTimeout = window.setTimeout; | |
window.setTimeout=function(func,delay) { | |
console.log("\n\nNew timer, delay:%s\nfunc:%s",delay, func); | |
return window.originalSetTimeout(function(e){console.log("\nTimerFired:%s",func);func(e)},delay); | |
}; |
This file contains 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
// | |
// Lazy PDO - register queries at startup, but only prepare them if they are actually used | |
// | |
class LPDO extends PDO | |
{ | |
private $querystrings; | |
public function __set($property,$value) | |
{ |