Skip to content

Instantly share code, notes, and snippets.

:bowtie:
Feeling optimistic

Bryan Clark clarkbw

:bowtie:
Feeling optimistic
Block or report user

Report or block clarkbw

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
View index.html
<script>
{
let a = "foo";
}
{
let b = 42; // set breakpoint here: debugger shows b == "foo"!
}
</script>
@clarkbw
clarkbw / redux-performance-mark.js
Last active Jul 13, 2019
A User Timing middleware for redux to create performance markers for dispatched actions
View redux-performance-mark.js
const timing = store => next => action => {
performance.mark(`${action.type}_start`);
let result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`
);
return result;
@clarkbw
clarkbw / ios-debugger.md
Last active Sep 19, 2016
Instructions for the debugger.html to debug Safari running in the iOS simulator
View ios-debugger.md

Safari

These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.

iOS Simulator (Mac only)

Requirements

  • Xcode
    • Download and install Xcode from Apple
@clarkbw
clarkbw / re-dash-csv.js
Last active Dec 21, 2016
re:dash snippet for getting the latest CSV data results from your query
View re-dash-csv.js
// edit these values
const API_KEY_ID = "9352fd37f2f4ce923932c9c6328829a5be7093ea3d";
const QUERY_ID = 1002;
const YOUR_REDASH = "https://your.redash.io/api/queries/";
// leave this
const API_KEY = `?api_key=${API_KEY_ID}`;
const RESULT_URL = `${YOUR_REDASH}${QUERY_ID}/results.csv${API_KEY}`;
d3.csv(RESULT_URL, function(data) {
@clarkbw
clarkbw / addLineWidget.patch
Created Aug 26, 2016
Uses addLineWidget in the debugger.html CodeMirror editor
View addLineWidget.patch
diff --git a/public/js/components/Editor.css b/public/js/components/Editor.css
index ff6160c..3986f92 100644
--- a/public/js/components/Editor.css
+++ b/public/js/components/Editor.css
@@ -52,6 +52,10 @@
z-index: 0;
}
+.new-breakpoint .CodeMirror-linewidget .helpful-message {
+ background-color: yellow;
@clarkbw
clarkbw / snippets.md
Last active Dec 1, 2017
Useful snippets for mozilla re:dash
View snippets.md
@clarkbw
clarkbw / formula.xls
Created Aug 1, 2016
sql like query of an another google spreadsheet
View formula.xls
=QUERY(
IMPORTRANGE(
"1pfBHQvc1A4b6WrByMLfk-VK9ycDwFEvlZZla2V6UWx4",
"data!A2:D260"
),
"Select Col2,Col3 where Col1 = '"&$B2&"'"
)
@clarkbw
clarkbw / responsive.patch
Created Jul 25, 2016
changes to the splitter for a responsive design version of the debugger.html
View responsive.patch
diff --git a/public/js/components/App.css b/public/js/components/App.css
index 7dc9896..86e507a 100644
--- a/public/js/components/App.css
+++ b/public/js/components/App.css
@@ -25,6 +25,7 @@ body {
.debugger {
display: flex;
flex: 1;
+ flex-flow: row wrap;
}
View CLA.txt
I give my permission to license under the MPL 2 any contributions I make to the debugger.html codebase.
@clarkbw
clarkbw / devtools-telemetry-metrics.py
Created Mar 9, 2016
gathers the DEVTOOLS Telemetry Histograms
View devtools-telemetry-metrics.py
import json
from functools import cmp_to_key
import locale
import urllib2
local_fname = 'Histograms.json'
url = 'https://hg.mozilla.org/mozilla-central/raw-file/tip/toolkit/components/telemetry/Histograms.json'
req = urllib2.Request(url)
response = urllib2.urlopen(req)
You can’t perform that action at this time.