Skip to content

Instantly share code, notes, and snippets.

View mr-mig's full-sized avatar
🐒
🍌 🔨 🖥

Alexey Migutsky mr-mig

🐒
🍌 🔨 🖥
View GitHub Profile
test gist
@mr-mig
mr-mig / Number Of Sites Using jQuery From Google CDN.sql
Last active August 29, 2015 13:57
SQL for number of sites using jQuery from Google CDN - Mar 1 2014, httparchive
SELECT "jquery" AS name,
count(distinct(pageid)) AS count,
(100*count(distinct(pageid))/290835) AS percent
FROM requests WHERE pageid <= 14802750 AND pageid >= 14489007
AND url LIKE "%//ajax.googleapis.com/ajax/libs/jquery/%"
@mr-mig
mr-mig / Most Popular jQuery versions from Google CDN.sql
Last active August 29, 2015 13:57
SQL for Most popular jQuery versions from Google CDN - Mar 1 2014, httparchive.org
@mr-mig
mr-mig / Top CDNs Serving JS Libs.sql
Last active August 29, 2015 13:57
Top CDNs Serving JS libs - Mar 1 2014, httparchive
select "Google"as name, count(distinct(pageid)) as count,
(100*count(distinct(pageid))/78160) as percent
from requests where pageid >= 14489007 and pageid <= 14802750
and url LIKE "%//ajax.googleapis.com/ajax/libs/%"
UNION
select "Yandex" as name, count(distinct(pageid)) as count,
(100*count(distinct(pageid))/78160) as percent
from requests where pageid >= 14489007 and pageid <= 14802750
and url LIKE "%//yandex.st/%"
UNION
@mr-mig
mr-mig / Total Number Of Sites Using CDNs.sql
Created March 9, 2014 16:16
SQL for Total number of sites using known CDNs, Mar 1 2014, httparchive
select "Total Sites" as label,
count(distinct(pageid)) as count,
(100*count(distinct(pageid))/290835) as percent
from requests where pageid >= 14489007 and pageid <= 14802750
and url LIKE "%//ajax.googleapis.com/ajax/libs/%"
or url LIKE "%//yandex.st/%"
or url LIKE "%//ajax.aspnetcdn.com/ajax/%"
or url LIKE "%//cdn.jsdelivr.net/%"
or url LIKE "%//cdnjs.cloudflare.com/ajax/libs/%"
or url LIKE "%//code.jquery.com/%";
@mr-mig
mr-mig / Google CDN Request Profile.sql
Last active August 29, 2015 13:57
Google CDN request profile - Mar 1 2014, httparchive
select "jquery" as name,count(distinct(pageid)) as count,
(100*count(distinct(pageid))/67198) as percent
from requests WHERE pageid <= 14802750 AND pageid >= 14489007
and url like "%//ajax.googleapis.com/ajax/libs/jquery/%"
UNION
select "jquerymobile" as name,count(distinct(pageid)) as count,
(100*count(distinct(pageid))/67198) as percent
from requests WHERE pageid <= 14802750 AND pageid >= 14489007
and url like "%//ajax.googleapis.com/ajax/libs/jquerymobile/%"
UNION
@mr-mig
mr-mig / Total Number Of Wordpress-powered Sites.sql
Created March 9, 2014 17:08
Total number of Wordpress-powered sites - Mar 1 2014
select count(distinct(pageid)) as count,
(100*count(distinct(pageid))/290835) as percent
from requests where pageid >= 14489007 and pageid <= 14802750
and url LIKE "%jquery-migrate%.js\\?ver=%"
or url LIKE "%jquery-migrate%.js\\?v=%";
@mr-mig
mr-mig / boot2docker-auto-startup.fish
Last active August 29, 2015 14:20
This is a fish shell lang. I put this stuff to ~/.config/fish/config.fish to have boot2docker automatically started
if [ (boot2docker status) != "running" ]
# start boot2docker
boot2docker start
# put VM ip into /etc/hosts
sudo sed -i '' '/docker/ d' /etc/hosts
set boot2docker_vm_ip (boot2docker ip)
echo "$boot2docker_vm_ip docker" | sudo tee -a /etc/hosts
end;
@mr-mig
mr-mig / machine.js
Last active November 22, 2019 09:40
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mr-mig
mr-mig / machine.js
Last active November 22, 2019 12:47
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=43e9d8859fcbcfdb8c0bf83d0873f4a6
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions