This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BBEdit" | |
tell window 1 | |
set show line numbers to (not show line numbers) | |
set show toolbar to (not show toolbar) | |
set show gutter to (not show gutter) | |
set show navigation bar to (not show navigation bar) | |
-- set show status bar to false | |
end tell | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BBEdit" | |
tell text window 1 | |
set tab width to 2 | |
set expand tabs to true | |
end tell | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myF = () -> | |
true | |
formattedOutput = | |
full_name: "Ryan Wilcox" | |
username: "rwilcox" | |
needs_profile_update: myF() ? "YES" : "NO" | |
# ^^^ generates (_ref = myF()) != null ? _ref : {"YES": "NO"} | |
# Ummm... that's odd... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example project showing how to write objects using the CSV npm package | |
# | |
# Uses the CSV 0.2.0 style syntax. For an example that shows CSV 0.4.0 | |
# (major syntax change) see https://gist.github.com/rwilcox/e8411242ffe4f06af35c#file-objects_to_csv-coffee | |
csv = require 'csv' | |
util = require 'util' | |
# Use the callback API to write this | |
callback_generate_csv_from_list = (records_to_write, cb) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example project showing how to write objects using the CSV npm package | |
# | |
# Uses the CSV 0.2.0 style syntax. For an example that shows CSV 0.4.0 | |
# (major syntax change) see https://gist.github.com/rwilcox/e8411242ffe4f06af35c#file-objects_to_csv-coffee | |
csv = require 'csv' | |
util = require 'util' | |
# Use the callback API to write this | |
callback_generate_csv_from_list = (records_to_write, cb) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example project showing how to write objects using the CSV npm package | |
csv = require 'csv' | |
util = require 'util' | |
# Use the callback API to write this | |
callback_generate_csv_from_list = (records_to_write, cb) -> | |
map_reduce_it = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
This Applescript lets you do a search starting at the top of the current document, NOT where the cursor is currently positioned | |
Author: Ryan Wilcox | |
Date: June 17, 2014 | |
License: Public Domain | |
*) | |
property oldSearchString : "fish" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# FOR MAX EFFECTIVENESS: | |
# Put in ~/(Dropbox or Library)/Application Support/BBEdit/Scripts | |
require 'net/http' | |
require 'json' | |
http = Net::HTTP.new('www.reddit.com') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- toggle live search in BBEDIT | |
tell application "BBEdit" | |
tell window 1 | |
set live search bar visible to (not live search bar visible) | |
end tell | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import re | |
THE_PATTERN= r'(^\s*(?P<function>(?P<function_name>[a-zA-Z0-9_@\.]+)\W*(=|:)\W*(\([a-zA-Z0-9_@,= \.@"{}\[\]]+\))?\W*(\-\>|\=\>)\W*))' | |
test_re = re.compile(THE_PATTERN) | |
class TestCoffeescriptFunctionParsing(unittest.TestCase): | |
def test_parse_simple_method(self): |