Skip to content

Instantly share code, notes, and snippets.

View artursopelnik's full-sized avatar

Artur Sopelnik artursopelnik

View GitHub Profile
@artursopelnik
artursopelnik / PHP_List_Currency_function
Created August 26, 2016 08:46
Php function return list of all the currencies.
function buildCurrency() {
$currency = array(
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
@artursopelnik
artursopelnik / countCSSRules.js
Created August 4, 2016 14:08 — forked from krisbulman/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE. — This snippet has been modified to count more than just the first level of CSSStyleRule objects within CSSMediaRule.
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {