Skip to content

Instantly share code, notes, and snippets.

View bgrins's full-sized avatar

Brian Grinstead bgrins

View GitHub Profile

Chrome:

console.log("%f", Infinity)
Infinity

console.log("%f", "Infinity")
NaN
@bgrins
bgrins / pr.md
Created February 17, 2016 18:57 — forked from piscisaureus/pr.md
Checkout github pull requests locally

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:

let cancelEvent = false;
function KeyShortcuts({ window, url, element }) {
...
}
KeyShortcuts.prototype = {
...

Keybase proof

I hereby claim:

  • I am bgrins on github.
  • I am bgrins (https://keybase.io/bgrins) on keybase.
  • I have a public key whose fingerprint is 9F9D 60FF 260C 582A FDF5 89AF 36E8 3311 DC9B 82B8

To claim this, I am signing this object:

diff --git a/devtools/client/themes/webconsole.css b/devtools/client/themes/webconsole.css
index 98597d4..a951783 100644
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -143,6 +143,7 @@ a {
direction: ltr;
overflow: auto;
-moz-user-select: text;
+ position: relative;
}
@bgrins
bgrins / connect-to-debugger.js
Created August 8, 2016 22:14
Browser console script to connect the debugger to the current page (non-e10s)
Cu.import("resource://gre/modules/jsdebugger.jsm");
addDebuggerToGlobal(this);
var dbg = new Debugger();
var DOwindow = dbg.addDebuggee(content.window);
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
@bgrins
bgrins / hgrc
Created November 2, 2016 21:23
Pulling from central but pushing to inbound
[paths]
default = https://hg.mozilla.org/mozilla-central
default-push = /push/to/inbound
inbound = ssh://hg.mozilla.org/integration/mozilla-inbound
try = ssh://hg.mozilla.org/try
central = ssh://hg.mozilla.org/mozilla-central/
review = ssh://reviewboard-hg.mozilla.org/gecko
cd testing/talos/talos/tests/devtools/addon/
# Make changes
# <MODIFY install.rdf version #>
zip -r devtools-signed.xpi .
jpm sign --api-key <APIKEY> --api-secret <APISECRET> --xpi devtools-signed.xpi
mv damp_devtools_at_maximum_performance-0.0.5-fx.xpi devtools-signed.xpi
https://github.com/Datomic/mbrainz-sample#getting-started
bin/datomic restore-db file:///Documents/mbrainz-1968-1973 datomic:free://localhost:4334/mbrainz-1968-1973