Skip to content

Instantly share code, notes, and snippets.

Avatar

jakub-g jakub-g

View GitHub Profile
@jakub-g
jakub-g / resource-timings-console-table.js
Last active Jul 10, 2019
A little copy-paste to dump resource timings to console via `console.table()`
View resource-timings-console-table.js
var regex = /playerv5|jquery/ // customize this
function pick(obj, ...entryNames) { let retObj = {}; entryNames.forEach(key => {retObj[key] = obj[key]}); return retObj }
// uncomment interesting items below, keeping in mind console width / no. of columns constraints
console.table(performance.getEntriesByType("resource")
.filter(item => item.name.match(regex))
.map(i => pick(i, 'name', /*'startTime', 'duration',*/ 'initiatorType',
'transferSize', 'encodedBodySize', 'decodedBodySize',
'fetchStart', /*'domainLookupStart','domainLookupEnd', 'connectStart', 'connectEnd', 'secureConnectionStart', 'requestStart', */'responseStart', 'responseEnd',)))
@danharper
danharper / demo.md
Last active Jul 3, 2020
Open native Maps apps on iOS and Android in Cordova
View demo.md
iOS (with pin, iOS will lookup address too and show that as label)
maps://?q=LAT,LNG
Android, no pin (just open at location)
geo:LAT,LNG
@staltz
staltz / introrx.md
Last active Aug 7, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
@ndarville
ndarville / business-models.md
Last active Jul 26, 2020
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.
View business-models.md

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View git-rebase--interactive.patch
fix:
/usr/libexec/git-core/git-rebase--interactive
-git rev-list $merges_option --pretty=oneline --abbrev-commit\
+git rev-list $merges_option --pretty=">%h (%an <%ae>) %s"\
result:
1 pick 19f43c1 (Yuri Dyachenko <yurial@gplvote.org>) add: gcrypt::noerr
2 pick 990a7e8 (Yuri Dyachenko <yurial@gplvote.org>) add: gcrypt::throwif( err ) throw if err != noerr
3 pick cb03f3b (Yuri Dyachenko <yurial@gplvote.org>) add: ext::move<T> move semantic
You can’t perform that action at this time.