Skip to content

Instantly share code, notes, and snippets.

Andrei Kashcha anvaka

Block or report user

Report or block anvaka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Pan and zoom some websites.

In the browser address bar type javascript: and then paste this line


Note: This doesn't work on some websites with strict content security policy (like Twitter or Facebook)

anvaka /
Created Nov 21, 2016
Javascript communities to find news and share yours
anvaka /
Last active Feb 9, 2018
The most popular keywords in modern research
View What's most commonly used with redux?
# Top 50 package most commonly used with redux.
react used 113 times
react-redux used 107 times
babel used 77 times
babel-core used 70 times
react-dom used 61 times
babel-loader used 61 times
webpack used 60 times
mocha used 58 times

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
View jquery versions on npm
Results generated by
> node countVersions.js jquery
Counting packages that depend on jquery...
[ { version: '^2.1.4', dependents: 319 },
{ version: '^2.1.3', dependents: 296 },
{ version: '^2.1.1', dependents: 239 },
{ version: '*', dependents: 121 },
{ version: '~2.1.0', dependents: 84 },
{ version: '~1.8.3', dependents: 63 },
anvaka / index.js
Created Feb 27, 2015
just a page rank perf
View index.js
// run:
// echo {} > package.json
// npm i byline ngraph.graph ngraph.pagerank
var byline = require('byline');
var fs = require('fs');
var g = require('ngraph.graph')();
var pagerank = require('ngraph.pagerank');
var stream = byline.createStream(fs.createReadStream('web-Google.txt', { encoding: 'utf8' }));
anvaka /
Last active Jan 16, 2019
npm modules with highest pagerank

This excercise computes PageRank of npm dependencies graph.

  1. Download all npm modules: wget
  2. Convert them into ngraph.graph using convertToGraph.js script.
  3. Run rank.js (see below):

Number of nodes: 123,969; Number of edges: 281,471; PageRank computed in 1,187 ms;

  1. underscore - 0.0132458168541106
  2. lodash - 0.012808245947189859
anvaka / index.js
Created Jan 10, 2015
requirebin sketch
View index.js
var addWheelListener = require('wheel');
addWheelListener(document.body, function (e) {
anvaka /
Last active May 16, 2019
Top GitHub users by total number of stars

I was playing with GitHub Archive recently. Out of curiosity I ran this query:

SELECT COUNT(repository_owner) as totalStars, repository_owner
FROM [githubarchive:github.timeline] 
WHERE type = 'WatchEvent'
GROUP BY repository_owner
ORDER BY totalStars DESC
LIMIT 1000
You can’t perform that action at this time.