Skip to content

Instantly share code, notes, and snippets.

.PHONY: irc_started irc_finished
define irc_message
remote=$$(git config --get remote.origin.url | tr -d '\n'); \
if [[ $${remote} =~ (https://|git@)github.com[/:](.*) ]]; then \
remote_subpath="$${BASH_REMATCH[2]}"; \
remote_subpath=$${remote_subpath%.git}; \
remote_url="https://github.com/$${remote_subpath}/pulls"; \
else \
echo ""; \
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch via npm",
"type": "node",
"request": "launch",
"env": { "BROWSER": "none" },
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "start"],
@robenkleene
robenkleene / Open Relative File Path.applescript
Last active December 3, 2024 11:58
Open Relative File Path in BBEdit AppleScript
try
openRelativeFilePath()
on error errMsg number errNum
display dialog "AppleScript encountered an error." & ¬
" Error Message: " & errMsg & " Number " & errNum
end try
on openRelativeFilePath()
tell application "BBEdit"
set theURL to missing value
@robenkleene
robenkleene / gist:3026027
Created June 30, 2012 23:31
Runs the frontmost BBEdit document as JavaScript in the frontmost Safari window. Useful for developing bookmarklets.
try
tell application "BBEdit"
set theJavaScript to contents of document 1
end tell
tell application "Safari"
activate
do JavaScript theJavaScript in document 1
end tell
on error errMsg number errNum