Skip to content

Instantly share code, notes, and snippets.

View gugu's full-sized avatar
🇺🇦

Andrii Kostenko gugu

🇺🇦
View GitHub Profile
@gugu
gugu / slowlog.sql
Created June 22, 2018 16:06
Slow log UI
SELECT q, COUNT(*) AS c, avg(query_time) as avg_query, avg(lock_time), COUNT(*) * AVG(query_time) as total_time
FROM (
SELECT regexp_replace(regexp_replace(regexp_replace(sql_text, "'.*?'", '?'), 'IN \\(.*?\\)', 'IN ?'), '\\d+', '?') as q, query_time, lock_time from mysql.slow_log
WHERE DATEDIFF(start_time, NOW()) < 30
) a
GROUP by q
ORDER BY total_time DESC
LIMIT 10;
@gugu
gugu / index.html
Created October 10, 2018 09:50
wYJNRy
<html>
<body>
<object data="https://www.gravatar.com/avatar/00000000000000000000000000000000?d=https%3A%2F%2Fexample.com%2Fimages%2Favatar.jpg" type="image/png">
test
</object>
</body>
</html>
@gugu
gugu / api.md
Last active April 21, 2019 19:49
Short.cm Enterprise API
export async function verifyCaptcha(captchaToken: string) {
try {
const verifyResponse = await got.post('https://www.google.com/recaptcha/api/siteverify', {
body: {
response: captchaToken,
secret: process.env.RECAPTCHA_SECRET,
},
form: true,
json: true,
});
@gugu
gugu / features.json
Last active March 18, 2021 17:08
short.io features
{
"paidFeatures":{"users":{"title":"Users","tooltip":"The number of users included in the plan.","tiny":"1","small":"1","standard":"unlimited","large":"unlimited"},"domains":{"title":"Custom domains","tooltip":"The number of custom domains you can use to create branded links. Domain name registration fees are not included in the plan cost.","tiny":"5","small":"10","standard":"50","large":"unlimited"},"links":{"title":"Branded links total","tooltip":"The number of branded links you can create and redirect to the destination URL. Limits are issued once and can be used over the account lifetime.","tiny":"1,000","small":"10,000","standard":"100,000","large":"unlimited"},"redirects":{"title":"Redirects","tooltip":"The number of visitors redirected from a branded link to the destination URL.","tiny":"unlimited","small":"unlimited","standard":"unlimited","large":"unlimited"},"tracked":{"title":"Tracked clicks","tooltip":"The limit of redirects visible in statistics (countries, devices, languages, time chart and mo
{
"type": "Topology",
"arcs": [
[
[16814, 15074],
[71, -45],
[53, 16],
[15, 54],
[55, 18],
[39, 37],