- /
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
#!/bin/sh | |
# Get your brand new Mac setup properly | |
# show full path in Finder title bar | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder | |
# show hidden files in Finder | |
defaults write com.apple.finder AppleShowAllFiles YES | |
killall Finder |
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
(* | |
Open source of current Safari document in BBEdit | |
David Miller | |
https://readmeansrun.com | |
*) | |
set mycontents to "" | |
set myname to "" | |
try |
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 "NSXMLNode+StringForXPath.h" | |
@implementation NSXMLNode (StringForXPath) | |
- (NSString *) stringForXPath:(NSString*)xpath | |
{ | |
NSError *error; | |
NSArray *nodes = [self nodesForXPath:xpath error:&error]; | |
if (error || nodes.count == 0) |
I hereby claim:
- I am davidfmiller on github.
- I am davidfmiller (https://keybase.io/davidfmiller) on keybase.
- I have a public key ASAgTW_t_wT0QgKwfHaHdKfDho9YtpploXBeIIKgRckrzAo
To claim this, I am signing this object:
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
/** | |
Smoothly scroll an element into the browser viewport | |
@param element {HTMLElement} - the element that which should be scrolled into the viewport | |
@param duration {Integer} - # of milliseconds the animation should take to complete | |
*/ | |
var scroll = function (selector, duration) { | |
var | |
offset = function(element) { |
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
(* https://readmeansrun.com *) | |
try | |
tell application "BBEdit" | |
set mydoc to file of (document 1 of window 1) | |
end tell | |
set posixPath to POSIX path of mydoc | |
if (posixPath ends with ".js" or posixPath ends with ".json") then | |
set cmd to "/usr/local/bin/node /usr/local/bin/jshint " & (quoted form of POSIX path of mydoc) & " | /usr/local/bin/bbresults -e --pattern '(?P<file>.+?):\\sline\\s(?P<line>\\d+),\\scol\\s((?P<col>\\d+),)?\\s+(?P<msg>.*)$'" | |
do shell script cmd | |
end if |
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
try | |
tell application "BBEdit" | |
set mywindow to window 1 | |
set mydoc to (URL of document 1 of mywindow) as POSIX file | |
set alldocs to documents of mywindow | |
repeat with doc in alldocs | |
if ((((URL of doc) as POSIX file) as string) is equal to (mydoc as string)) then | |
-- active doc | |
else |
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
try | |
tell application "BBEdit" | |
set mydoc to (URL of document 1 of window 1) as POSIX file | |
end tell | |
tell application "LaunchBar" | |
open mydoc | |
end tell | |
on error | |
beep | |
end try |
NewerOlder