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
| /** | |
| * @param str string | |
| * | |
| * @return string | |
| * | |
| * @author adam-lynch | |
| */ | |
| var convertHyphenatedToCamelCase = function( str ){ | |
| return str.replace( /-([a-z])/g, function( matches ){ | |
| return matches[1].toUpperCase(); |
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
| (function($){ | |
| var _oldOn = $.fn.on; | |
| $.fn.on = function( types, selector, data, fn, one ){ | |
| var selectorSegments = selector.match(/^(.+?)(:only)?$/); | |
| if ( selectorSegments[2] ) { | |
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
| /** | |
| * @param dataAttributeName string | |
| * @param desiredDataAttributeValue string (optional) | |
| * (desiredDataAttributeValue must be a string, strict comparison is done with data attribute value) | |
| * | |
| * @author: adam-lynch | |
| */ | |
| $.fn.filterByDataAttribute = function(dataAttributeName, desiredDataAttributeValue){ | |
| return $(this).filter(function() { | |
| return desiredDataAttributeValue && $(this).data(dataAttributeName) === desiredDataAttributeValue |
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
| $iterator = new \RegexIterator( | |
| new \RecursiveIteratorIterator( | |
| new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), | |
| \RecursiveIteratorIterator::LEAVES_ONLY | |
| ), | |
| '%^.*?(([^\\\]+?)\.png)$%', | |
| \RecursiveRegexIterator::GET_MATCH | |
| ); | |
| foreach ($iterator as $file) { |
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
| task :jekyll do | |
| puts '* Changing the codepage' | |
| `chcp 65001` | |
| puts '* Running Jekyll server' | |
| `jekyll --server` | |
| end |
NewerOlder