- Pagination
- Filters
- Order By
- Limit
- Validation
- Ajax Controller
- Assets
- RSS
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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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
# | |
# Delete email older than %% | |
# | |
$ find /home/%ACCOUNT%/mail/%MAILBOX%/new -type f -mtime +30 -delete | |
$ find /home/%ACCOUNT%/mail/%MAILBOX%/cur -type f -mtime +30 -delete | |
# | |
# Fix quotas | |
# https://forums.cpanel.net/threads/how-to-reset-mail-quota.105325/#post-691898 | |
# |
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
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
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
^(?:[\t ]*(?:\r?\n|\r))+ |
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
sed -n -e '/DROP TABLE.*%TABLE%/,/UNLOCK TABLES/p' %DATABASE-DUMP%.sql > %EXPORT%.sql |
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
# Add user | |
adduser -s /bin/false -d %PATH% %USER% | |
# Set user password | |
passwd %USER% | |
# Add permissions to ACL | |
setfacl -R -d -m "u:%USER%:rwx" %PATH% | |
setfacl -R -m "u:%USER%:rwx" %PATH% |
// please comment if you know of other BOOKS (not considering blogs just yet) on ES6 that are out or coming out
- Understanding ECMAScript 6 -- Nicholas Zakas
- Exploring ES6 -- Axel Rauschmayer
- YDKJS: ES6 & Beyond -- Kyle Simpson
- JS.next: A Manager's Guide -- Aaron Frost
- Expert JavaScript -- Mark E. Daggett
- JavaScript Allongé, The "Six" Edition -- Reginald Braithwaite
- Learning ECMAScript 6 -- Narayan Prusty
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 | |
function simplifyMultiFileArray($files = array()){ | |
$sFiles = array(); | |
if(is_array($files) && count($files) > 0){ | |
foreach($files as $key => $file){ | |
foreach($file as $index => $attr){ | |
$sFiles[$index][$key] = $attr; | |
} | |
} |