Skip to content

Instantly share code, notes, and snippets.

@ozselgin
ozselgin / gist:1727be68a06f7a20f1d4032acf2608eb
Created November 17, 2023 12:40
reduceQuerySelectorAll
Array.from(document.querySelectorAll("div[data-column=asin] span")).reduce((acc, current) => acc + "," + current.innerText, "");
@ozselgin
ozselgin / gist:304b566d2962263268b50f0a860dc654
Last active May 5, 2022 09:42
Jquery Click All Links with Selector
var script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
document.getElementsByTagName('head')[0].appendChild(script);
$(".btn.btn-link.btn-xs.quick-edit").each(function() { $( this ).click();});
@ozselgin
ozselgin / gist:8001970
Created December 17, 2013 08:52
php prime benchmarks
<?php
$previousPrime = 2000000000;
for($i=0; $i<1000000; $i++){
$prime = gmp_nextprime ($previousPrime);
echo gmp_strval($prime) . PHP_EOL;
$previousPrime = $prime;
}
@ozselgin
ozselgin / mathjaxexample.html
Last active December 15, 2015 04:09
Basic mathjax example. LaTeX is used. Basit mathjax örneği. LaTeX notasyonu kullanıldı.
<html>
<head>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
<ol>
<li>
\[
\frac{8 \sqrt{6}}{2 \sqrt{3}}
=
$(":input").attr('checked', "checked");