Skip to content

Instantly share code, notes, and snippets.

View net-task.yml
version: 1
command: python3
script: |
print("hi from the network")
View github_news_only_greasemonkey.js
// ==UserScript==
// @name Only Github News
// @version 1
// @grant none
// @include /^https?://github\.com\/\?news=only/
// ==/UserScript==
rwilcox / spanner_client.ts
Last active February 27, 2023 17:17
Spanner and Typescript
View spanner_client.ts
// 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`
View github_pr_extra_wide_please_greasemonkey.js
// ==UserScript==
// @name Make Github PR big
// @version 1
// @grant none
// @match*/*/pull/*
// @run-at document-idle
// ==/UserScript==
rwilcox /
Created January 22, 2022 19:11
Career New Job Hunting Questions
View omniouutliner_to_md.js
"type": "action",
"targets": ["omnioutliner"],
"author": "Marc A. Kastner, with minor edits by Ryan Wilcox",
"description": "Create a markdown compatible format from the current document and export it to Drafts 5.",
"label": "Drafts - New Draft with Markdown format",
"paletteLabel": "Drafts Doc"
var _ = function() {
rwilcox / standalone.js
Created March 15, 2019 01:33
Ever wanted to just give someone a single .js file, but also wanted to pull in a Node module? Fret no more!
View standalone.js
#!/usr/bin/env node
Node script are kind of cool, but they are hard to low-tech write a Node script for someone and give it to them.
Sure you can publish a package to NPM, set the binary flag, go through some house keeping... but sometimes that's just
not worth the effort.
So: can you distribute a Node script that will install it's own modules from a single file?
View web_api_play_thoughts.js
const process = require("process")
const superagent = require('superagent')
const Ajv = require("ajv")
// This example is inspired by the idea of
// although that package has a way better DSL by not being written in Javascript
// Normally a playground script like this would serve two purposes:
// 1. All developers to pass around scripts of things that Should Work
#from faker import Faker
#fake = Faker('en_US')
#print fake.words() # sentence() #bs() # catch_phrase()
import requests
import random
def main():
rwilcox / bb_toggle_distraction_free.applescript
Last active August 29, 2015 14:16
Turn BBEdit into a distraction free writing environment
View bb_toggle_distraction_free.applescript
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