See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
<?php | |
define('HTML_REGEX_PATTERN', '/<([a-zA-Z]+)(?:\s([a-zA-Z]+(?:=(?:".+")|(?:[0-9]+))))*(?:(?:\s\/>)|(?:>(.*)<\/\1>))/'); | |
function isHtmlTag($text) { | |
return preg_match(HTML_REGEX_PATTERN, $text); | |
} | |
function hasHtmlTag($text) { | |
return preg_match_all(HTML_REGEX_PATTERN, $text); |
window.AttachmentUtils = (function() { | |
var BASE64_MARKER = ';base64,'; | |
var Utils = { | |
// Takes a file size (in bytes) and returns a human-friendly string representation. | |
humanFileSize: function(size) { | |
if(size < 1) return "0 bytes"; | |
// http://stackoverflow.com/a/20732091 |
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
$(window).on('mousewheel', function() { | |
$('html, body').stop(); | |
}); |
<?php | |
$languages = icl_get_languages(); | |
foreach($languages as $l){ | |
$langs[] = '<li><a href="'.$l['url'].'">'.$l['native_name'].'</a></li>'; | |
} | |
echo join('', $langs); | |
?> |
<?php | |
/** | |
* On-the-fly CSS Compression | |
* Copyright (c) 2009 and onwards, Manas Tungare. | |
* Creative Commons Attribution, Share-Alike. | |
* | |
* In order to minimize the number and size of HTTP requests for CSS content, | |
* this script combines multiple CSS files into a single file and compresses | |
* it on-the-fly. | |
* |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |