Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Make Github PR big
// @version 1
// @grant none
// @match https://github.com/*/*/pull/*
// @run-at document-idle
// ==/UserScript==
document.querySelector(".Layout-sidebar").remove()
@rwilcox
rwilcox / Job_hunt_questions.md
Created January 22, 2022 19:11
Career New Job Hunting Questions

Create a mission statement

Professional

Personal

Create an elevator pitch

Scenario: you get into an elevator with some CEO. Why should they hire you? What do you do and what value can you bring to their org?

@rwilcox
rwilcox / email.plist
Created November 23, 2011 05:37
Super Simple Email Codeless Language Module for BBEdit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--
BBEdit codeless language module for email (for example, what comes out of Mutt when you use "bbedit -w" as its editor)
Feel free to customize.
By Ryan Wilcox
Requires BBEdit 8.0 or higher. To install, copy here:
/*{
"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
rwilcox / services.markdown
Created September 21, 2011 20:26
How to create a new gist from OS X Service

How to create a Public Gist Service:

Step 0: Open Automator, New Service.

Step 1: Drag out Run Shell Script action. Pass Input to STDIN

Step 2: This code:

open `gist`
@rwilcox
rwilcox / each_line_to_file.py
Created August 2, 2012 13:21
Sends each line in the current BBEdit document to its own file
#!/usr/bin/env python
# A simple script that takes each line of the currently open (and saved!) document
# and outputs a file for each line, named with the first matching group of the name_grep
# regex
#
# It saves its output to a folder named "output" on the desktop
#
# Not really meant for general consumption, but as a tool that gets modified with every new
# time you have to do this.
@rwilcox
rwilcox / view_all_comments_for_pr.sh
Last active August 20, 2019 15:20
View all comments, even outdated ones, for a PR on Github
#!/opt/local/bin/zsh
# NOTE: requires ZSH for vered. If you're using another shell you'll need to set PULL_NUMBER, ORGANIZATION and REPO
# somehow yourself
# also depends on the jgrep gem (jgrep for "json grep"). jgrep respects object structure and lets
# me search for _links.html.href
GITHUB_USERNAME=rwilcox
GITHUB_PASSWORD=hahahahaha
@rwilcox
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!
#!/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?
const process = require("process")
const superagent = require('superagent')
const Ajv = require("ajv")
// This example is inspired by the idea of https://riposte.in/
// 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
@rwilcox
rwilcox / open_here.applescript
Created March 9, 2012 14:26
Open Here in Current iTerm Tab
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
tell application "iTerm"
tell current session of current terminal
write text "pushd \"" & theUnixPath & "\""
end tell
activate
end tell