Skip to content

Instantly share code, notes, and snippets.

@peterflynn
peterflynn / Useful GitHub bookmarklets
Last active August 30, 2023 06:54
GitHub comment thread bookmarklets
To use: create a new bookmark and paste into the URL field.
In Chrome, you can paste the full multiline code as shown below.
In other browsers, you may need to minify the code into one line first.
@peterflynn
peterflynn / Bug-10590-testcase.html
Last active September 3, 2015 07:49
Testcase to repro Brackets bug #10590
<!doctype html>
<html>
<head>
<title>CodeMirror line widget / wordwrap issue</title>
<script src="http://codemirror.net/lib/codemirror.js"></script>
<link rel="stylesheet" href="http://codemirror.net/lib/codemirror.css">
<style type="text/css">
.CodeMirror {
margin: 0;
border: 0;
@peterflynn
peterflynn / gist:17694e1d2f0e9d9151c9
Created January 10, 2015 02:52
Unit tests for Brackets Async module with concurrent array mutation
describe("Concurrent mutation", function () {
function runTest(asyncAPI, arrayMutate) {
var items = [1, 2, 3];
var deferreds = [];
var nextExpectedItem = 1;
var masterPromise = asyncAPI(items, function (item, i) {
expect(item).toBe(nextExpectedItem);
expect(i).toBe(nextExpectedItem - 1);
nextExpectedItem++;
arrayMutate(items, item, i);
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="pane-content" style="height: 500px">
<div class="image-view" style="top: 0px; left: 0px; width: 1690px; height: 500px;">
<div class="image-centering">
@peterflynn
peterflynn / gist:af3e5baf6b68d10f495b
Created November 25, 2014 02:12
sample minified file for CodeMirror bug
This file has been truncated, but you can view the full file.
eval("01234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890123456789112345678921234567893123456789412345678951234567896123456789712345678981234567899123456789012345678911234567892123456789312345678941234567895123456789612345678971234567898123456789912345678901234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890123456789112345678921234567893123456789412345678951234567896123456789712345678981234567899123456789012345678911234567892123456789312345678941234567895123456789612345678971234567898123456789912345678901234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890123456789112345678921234567893123456789412345678951"),function(root){define("0123456789",[],function(){return function(){return eval('012345678911234567892123456789312345678941234567895123456789612345678971234567898123456789912345678901234567891123456789212345678931234567894123456789512345678961234567897123456789812
@peterflynn
peterflynn / gist:f214f87bafec5d360ccf
Created November 25, 2014 02:05
Brackets scriptlet to anonymize all the strings in a very large JS file, without changing its length or formatting
function makeFiller(len) {
var str = "";
var i;
for (i = 0; i < len; i++) {
var mod = i % 10;
if (mod) {
str += mod;
} else {
mod = (i / 10) % 10;
str += mod;
@peterflynn
peterflynn / gist:f0640225b5315b0f82c5
Last active August 29, 2015 14:10
Brackets scriptlet to anonymize all the strings in a JS file, without changing its length or formatting
function makeFiller(len) {
var str = "";
var i;
for (i = 0; i < len; i++) {
var mod = i % 10;
if (mod) {
str += mod;
} else {
mod = (i / 10) % 10;
str += mod;
Process: Brackets Helper [385]
Path: /Applications/Brackets.app/Contents/Frameworks/Brackets Helper.app/Contents/MacOS/Brackets Helper
Identifier: org.cef.cefclient.helper
Version: ???
Code Type: X86 (Native)
Parent Process: Brackets [382]
Responsible: Brackets [382]
User ID: 501
Date/Time: 2014-03-25 10:24:07.269 +0100
@peterflynn
peterflynn / index.html
Created April 9, 2014 03:38
Extremely simple HTML/CSS boilerplate
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
@peterflynn
peterflynn / app.js
Last active August 29, 2015 13:57
Brackets/Tern bug repro case
/**
* @license MelonJS Game Engine
* @copyright (C) 2011 - 2013 Olivier Biot, Jason Oster
* http://www.melonjs.org
*
* melonJS is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license.php
*
*/