Skip to content

Instantly share code, notes, and snippets.

View tufandevrim's full-sized avatar

Devrim Tufan tufandevrim

  • Nextdoor
  • Santa Clara, CA
View GitHub Profile
@tufandevrim
tufandevrim / browsertime.har
Created November 27, 2018 22:03
wikipedia har
{"log":{"version":"1.2","creator":{"name":"chrome-har","version":"0.5.0","comment":"https://github.com/sitespeedio/chrome-har"},"browser":{"name":"Chrome","version":"70.0.3538.102"},"pages":[{"id":"page_1","startedDateTime":"2018-11-27T21:26:12.279Z","title":"Wikipedia, the free encyclopedia run 1","pageTimings":{"onContentLoad":246.134,"onLoad":602.149,"_firstPaint":536,"_domInteractiveTime":140,"_domContentLoadedTime":140},"_meta":{"connectivity":"native"},"_visualMetrics":{},"_cpu":{}},{"id":"page_1-1","startedDateTime":"2018-11-27T21:26:17.492Z","title":"Wikipedia, the free encyclopedia run 2","pageTimings":{"onContentLoad":218.903,"onLoad":546.338,"_firstPaint":478,"_domInteractiveTime":118,"_domContentLoadedTime":118},"_meta":{"connectivity":"native"},"_visualMetrics":{},"_cpu":{}},{"id":"page_1-1-1","startedDateTime":"2018-11-27T21:26:22.727Z","title":"Wikipedia, the free encyclopedia run 3","pageTimings":{"onContentLoad":196.834,"onLoad":502.612,"_firstPaint":471,"_domInteractiveTime":104,"_domContent
@tufandevrim
tufandevrim / walksync.js
Created January 5, 2018 23:26 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {