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
/** | |
* Uncamelize a string, joining the words by separator character. | |
* @param string Text to uncamelize | |
* @param string Word separator | |
* @return string Uncamelized text | |
*/ | |
function uncamelize(text, separator) { | |
// Assume separator is _ if no one has been provided. | |
if(typeof(separator) == "undefined") { |
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
/** | |
* Camelize a string, cutting the string by separator character. | |
* @param string Text to camelize | |
* @param string Word separator (underscore by default) | |
* @return string Camelized text | |
*/ | |
function camelize(text, separator) { | |
// Assume separator is _ if no one has been provided. | |
if(typeof(separator) == "undefined") { |
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
<table> | |
{% for record in records %} | |
<tr class="record{% if loop.index is divisibleby(2) %}even{% else %}odd{% endif %}"> | |
<td>{{ record.id }}</td> | |
<td>{{ record.title }}</td> | |
</tr> | |
{% endfor %} | |
</table> |
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
git config --global color.ui auto |
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
powercfg -h off |
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
/** | |
* Simulate the read-only attribute on a select list (as it is not normalized). | |
* @see http://www.w3.org/wiki/HTML/Elements/select | |
* @param Object Select list element | |
**/ | |
function setReadOnlyOnSelect(selectList) | |
{ | |
// Ensure selectList exists | |
if(!selectList.length) { | |
console.warn("Unable to find specified select list."); |
NewerOlder