Skip to content

Instantly share code, notes, and snippets.

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

Alexey Migutsky mr-mig

🐒
🍌 🔨 🖥
View GitHub Profile
@mr-mig
mr-mig / machine.js
Created November 22, 2019 12:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@mr-mig
mr-mig / machine.js
Last active November 22, 2019 13:07
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=5fe14e8b6f72489354c0dee1834cf5ce
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mr-mig
mr-mig / machine.js
Created November 22, 2019 11:52
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@mr-mig
mr-mig / machine.js
Last active November 22, 2019 13:20
Generated by XState Viz: https://xstate.js.org/viz
// https://xstate.js.org/viz/?gist=57d0f3da972f353fa57b488fdc6f3464
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
@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
@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 / 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 / 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 / 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 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/%";