See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| #!/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 |
| # BEGIN MAINTENANCE MODE | |
| # ADD your IP address to gain access. Local IPS for local testing | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.0 | |
| RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 | |
| RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
| RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f | |
| RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
| RewriteRule ^.*$ /maintenance.html [R=503,L] |
| <?php | |
| /** | |
| * Recursively get taxonomy hierarchy | |
| * | |
| * @source http://www.daggerhart.com/wordpress-get-taxonomy-hierarchy-including-children/ | |
| * @param string $taxonomy | |
| * @param int $parent - parent term id | |
| * | |
| * @return array |
| // @function explode() -- split a string into a list of strings | |
| // {string} $string: the string to be split | |
| // {string} $delimiter: the boundary string | |
| // @return {list} the result list | |
| @function explode($string, $delimiter) { | |
| $result: (); | |
| @if $delimiter == "" { | |
| @for $i from 1 through str-length($string) { | |
| $result: append($result, str-slice($string, $i, $i)); | |
| } |
| <!DOCTYPE html> | |
| <head> | |
| <script type='text/javascript'> | |
| window.onload = function () { | |
| var video = document.getElementById('videoId'); | |
| var canvas = document.getElementById('canvasId'); | |
| var img = document.getElementById('imgId'); | |
| video.addEventListener('play', function () { | |
| canvas.style.display = 'none'; |
| Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |
| #!/bin/bash | |
| # When pod install or pod update gets hanged at "Analyzing dependencies", please consider to reinstall cocoapods. | |
| # 1. Uninstallation | |
| # Reference: http://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine | |
| for x in `gem list --no-versions | grep cocoapods`; do gem uninstall $x -a -x -I; done | |
| # 2. Reinstall cocoapods | |
| sudo gem install cocoapods |
| # CRON: crontab header to run node and grunt within a cron job | |
| #!/bin/sh | |
| SHELL=/bin/sh | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |