Skip to content

Instantly share code, notes, and snippets.

@jlieske
jlieske / Check JavaScript with TypeScript Compiler.scpt
Created May 26, 2019 06:14
Script for BBEdit to perform check of JavaScript program using TypeScript compiler.
local theFileAlias, theFilePath, theDirectoryPath, runCheck, extractErrors, exportPath, bbresults
-- Get the file path of the front document.
tell application "BBEdit"
set theFileAlias to (file of active document of front window)
end tell
set theFilePath to POSIX path of theFileAlias
-- Run the check command from the document's directory.
set theDirectoryPath to do shell script "dirname " & quoted form of theFilePath
@jlieske
jlieske / Check JavaScript with ESLint.py
Created May 19, 2016 06:51
Script for BBEdit to perform check of JavaScript program using ESLint.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Check JavaScript with ESLint:
# Script to perform check of front window using ESLint.
# Place this script in the script menu and invoke it from BBEdit.
# You will also need a .eslintrc or package.json file with the style rules.
# Copyright Jay Lieske Jr.
# 18 May 2016
@jlieske
jlieske / Check JavaScript with JSCS.py
Last active May 19, 2016 06:48
Script for BBEdit to perform check of JavaScript program using JSCS.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Check JavaScript with JSCS:
# Script to perform check of front window using JSCS (JavaScript Check Style).
# Place this script in the script menu and invoke it from BBEdit.
# You will also need a .jscsrc or package.json file with the style rules.
# Copyright Jay Lieske Jr.
# 11 May 2016
@jlieske
jlieske / Check JavaScript with Closure Compiler.py
Last active May 19, 2016 06:47
Script for BBEdit to perform check (but not compilation) of JavaScript program using Google's Closure Compiler.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Check JavaScript with Closure Compiler:
# Script to perform check (but not compilation) of front window using
# Google's Closure Compiler.
# Place this script in the script menu and invoke it from BBEdit.
# Copyright Jay Lieske Jr.
# 11 May 2016
@jlieske
jlieske / open-bbedit-browser.applescript
Last active May 7, 2016 07:06
BBEdit scripts to show issue opening result browser
#!/usr/bin/osascript -l AppleScript
-- This script will open the BBEdit result browser.
tell application "BBEdit"
set e to {¬
result_kind:note_kind,¬
result_file:"/System/Library/ScriptingDefinitions/CocoaStandard.sdef",¬
result_line:1,¬
message:"This browser will open"¬
@jlieske
jlieske / TryThenWhile.swift
Created February 17, 2015 06:33
Monadic while loop
//
// TryThenWhile.swift
// TryThenWhile
//
// Created by Jay Lieske on 2015.02.16.
// Copyright (c) 2015 Jay Lieske. All rights reserved.
//
import Cocoa
import XCTest
@jlieske
jlieske / bberrors.py
Last active May 11, 2016 06:24
Script to display compiler output messages in BBEdit browser window
#!/usr/bin/python
# -*- coding: utf-8 -*-
# BBErrors: Script to display compiler output messages in BBEdit browser window
# Copyright Jay Lieske Jr.
# 2 May 2016
import sys, re, os
import struct
from Foundation import NSAppleEventDescriptor
@jlieske
jlieske / open-dylan.log
Created April 15, 2012 18:55
Trying to run Open Dylan compiler outside of /opt
% setenv OD '/Users/jay/Downloads/Dylan/opendylan-2011.1-x86-darwin'
% set path=($OD/bin $path)
% env DYLD_LIBRARY_PATH="$OD/lib" dylan-compiler -build hello-world.lid
Hacker Edition
Version 2011.1
Copyright (c) 1997-2004, Functional Objects, Inc.
Portions Copyright (c) 2004-2011, Dylan Hackers
Portions Copyright (c) 2001-2002, Ravenbrook Ltd.
Importing /Users/jay/Coding/Dylan/hello-world/hello-world.lid to /Users/jay/Coding/Dylan/hello-world/hello-world.hdp
Finding registries
@jlieske
jlieske / brew-upgrade.log
Created November 24, 2011 20:46
Failure in `brew upgrade`
sudo -u admin brew upgrade
Error: undefined method `include?' for nil:NilClass
Please report this bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/Library/Homebrew/Library/Homebrew/formula.rb:393:in `canonical_name'
/Library/Homebrew/Library/Homebrew/formula.rb:425:in `factory'
/Library/Homebrew/Library/Contributions/examples/brew-upgrade.rb:7
/Library/Homebrew/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/Library/Homebrew/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:47:in `require'