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 | |
# Why not bash? | |
# bash is annoying for opts handling | |
# AND especially annoying if those opts need to be in both --key value AND --key=value format | |
# AND not DRY. | |
# and Ruby is pretty close to bash in syntax. Or it's close to Perl, which is close to Bash | |
# and Python feels like a bunch of boilerplate here | |
require 'optparse' |
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
-- but this in your system level Script menu (using the Script Menu builtin in OS X, or Fastscripts from http://red-sweater.com | |
tell application "BBEdit" | |
set newDoc to scratchpad window | |
select newDoc | |
activate | |
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
version: 1 | |
tasks: | |
from-net: | |
command: python3 | |
script: | | |
print("hi from the network") |
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
// ==UserScript== | |
// @name Only Github News | |
// @version 1 | |
// @grant none | |
// @include /^https?://github\.com\/\?news=only/ | |
// ==/UserScript== | |
document.querySelector(".team-left-column").remove() |
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
// I should probably write a blog post about this, but whatever | |
import { Spanner, Instance } from '@google-cloud/spanner' | |
import type { Database } from '@google-cloud/spanner' | |
/** | |
Authentication is provided by the local machine user running | |
`gcloud auth application-default login` | |
*/ |
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 | |
curl $1 | /usr/local/bin/bbedit | |
# Call this script like so: | |
# web2bbedit.sh http://www.barebones.com | |
# This will open the Bare Bone Software homepage as HTML in BBEdit |
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
// ==UserScript== | |
// @name Github remove relative date stupidness | |
// @namespace http://www.wilcoxd.com | |
// @include https://github.com* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// created: WD-rpw 03-25-2013 |
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
-- by Ryan Wilcox, March 30, 2012, licensed under Public Domain | |
tell application "BBEdit" | |
tell window 1 | |
set theRes to display dialog "Create how many columns?" default answer "3" | |
set columnNum to (text returned of theRes as number) | |
set insertionP to get selection | |
set tableColumnText to "| <##> " | |
set tableRowText to "" |
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" to set theFile to file of document 1 | |
tell application "Finder" to set theFolder to (container of file theFile) as alias | |
set theUnixPath to POSIX path of theFolder | |
set output to return & "cd '" & theUnixPath & "'; pwd" | |
tell application "BBEdit" | |
set uws to Unix worksheet window | |
tell uws | |
select insertion point after last character | |
set selection to output |
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" | |
set theScript to selection as text | |
set clippingFileRef to (path to temporary items as string) & "clipping_as_selection" | |
--close access clippingFileRef | |
set fileref to open for access file clippingFileRef with write permission | |
set eof of fileref to 0 -- clear the file | |
write theScript to fileref | |
close access fileref |
NewerOlder