Skip to content

Instantly share code, notes, and snippets.

Brett Zamir brettz9

Block or report user

Report or block brettz9

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
brettz9 /
Last active May 12, 2019
Sourcetree Custom action to open in Terminal *tab*; need `chmod 0755` enable SourceTree in `System Preferences->Security & Privacy->Privacy->Accessibility`; note: implementing as an application did not seem to work from within Sourcetree
dir=$(dirname "$1")
scr=$(cat <<EOF
on run {}
set directory to "$dir"
set newTab to (application "Terminal" is running)
tell application "Terminal"
View timeout.js
const timeout = (delay) => {
// eslint-disable-next-line promise/avoid-new
return new Promise((resolve) => {
setTimeout(() => {
}, delay || 0);
brettz9 /
Last active May 12, 2019
Sourcetree Custom Actions (right-click)


  • Menu Caption: Open in Atom
  • Script to run: /usr/local/bin/atom
  • Parameters: -n false -a $REPO


  • Menu Caption: Open in Terminal Tab
  • Script to run: /Applications/
  • Parameters: Parameters: $REPO/$FILE
fs = require('fs')
path = require('path')
{CompositeDisposable} = require 'atom'
ProjectPathListView = require './project-path-list-view'
getActiveFilePath = () ->
document.querySelector('.tree-view .selected')?.getPath?() ||
brettz9 / before.js
Created Sep 28, 2018 — forked from harto/before.js
Mocha before() & beforeEach() execution order with nested describe()
View before.js
'use strict';
describe('mocha before hooks', function () {
before(() => console.log('*** top-level before()'));
beforeEach(() => console.log('*** top-level beforeEach()'));
describe('nesting', function () {
before(() => console.log('*** nested before()'));
beforeEach(() => console.log('*** nested beforeEach()'));
it('is a nested spec', () => true);
brettz9 /
Last active Apr 24, 2019
Gist Table of Contents (focusing for now on still useful items or at least interesting experiments); also may organize info on repos
brettz9 / speech.html
Last active Sep 15, 2018
View speech.html
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Speech transcription</title>
#transcriptionResults {
width: 100%;
height: 500px;
brettz9 / fixed-table-header.css
Last active Jun 1, 2017
Boiled down, heavily annotated demo from on (relatively) fixed table headers (and footers added); JSFiddle at . See also and
View fixed-table-header.css
Originally from:
See also and
html, body {
height: 100%; /* Needed to ensure descendent heights retain 100%; could be avoided if didn't want percent on table height */
brettz9 / console-log.html
Last active Mar 21, 2017
Override console methods to include file/line number (and potentially full stack). TODO: Pass suspected suspect line and whole stack with modified content to callback. For background, see
View console-log.html
<!DOCTYPE html>
<meta charset="utf-8" />
<script src="console-log.js"></script>
function a () {
console.log('xyz'); // xyz (console-log.html:10)
brettz9 / openThunderbirdMail.js
Last active Jan 1, 2017
Snippet for use with [Custom Buttons]( to open a specific email in Thunderbird from a custom toolbar button.
View openThunderbirdMail.js
- (Gloda)
- (datamodel.js)
- eMarks souce!
You can’t perform that action at this time.