Skip to content

Instantly share code, notes, and snippets.

@rwilcox
rwilcox / greasemoney_campfire_shaddup_robot.js
Last active December 23, 2015 21:09
A greasemonkey script to gray out Campfire messages from your Campfire Bot
// ==UserScript==
// @name Campfire Shaddup Robot
// @namespace http://fanzter.com/
// @downloadURL https://gist.github.com/rwilcox/6693982/raw/greasemoney_campfire_shaddup_robot.js
// @description Grays out Campfire talk by (defined) robots
// @include https://*.campfirenow.com/room/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_log
// @version 1
@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 / tmp_clone_and_open_in.sh
Last active September 13, 2016 20:31
Clone and open a Github project in BBEdit
#!/usr/bin/env zsh
# Think of this script like a remote version of npm edit
# Release in the public domain, by Ryan Wilcox 2013
cd /tmp
git clone $1
repo_name_incl_git=$(basename $1)
just_folder_name="${repo_name_incl_git%.*}"
bbedit $just_folder_name
@rwilcox
rwilcox / github_remove_relative_date_greasemonkey.user.js
Last active November 29, 2022 02:38
Remove Github's relative date
// ==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
@rwilcox
rwilcox / select_value_in_bbedit.applescript
Created February 11, 2013 16:02
In BBEdit, Selects the VALUE out of a Javascript record literal in Applescript
(*
This BBEdit script selects the VALUE out of a Javascript(style) KEY: value record literal
Imagine a BBEdit selection of this line:
{"editor":"bbedit", "os": "macosx"}
Running this script will select "bbedit" (with quotes).
@rwilcox
rwilcox / bbedit_selection_to_notational_velocity.applescript
Created February 5, 2013 14:54
BBEdit Selection to Notational Velocity (and delete)
on getNotesFolder() tell application "Finder" set homeFolder to path to home folder return folder "Notational Data" of folder "Application Support" of folder "Dropbox" of homeFolder end tell end getNotesFolder on run tell application "BBEdit" set sel to selection as string set the selection to "" tell me to set notesF to getNotesFolder() as alias activate set dialogRes to display dialog "Name the file:" default answer "something.markdown" set filePath to ((notesF as string) & (text returned of dialogRes)) set newDoc to (make new text document) set contents of newDoc to sel save newDoc to file filePath without saving as stationery end tell end run
@rwilcox
rwilcox / bbedit_text_filter_in_applescript.applescript
Last active September 13, 2016 20:31
bbedit_text_filter_in_applescript
-- this script transforms all your spaces into newlines
on RunFromBBEdit(rangeFromBBEdit)
-- RunFromBBEdit is called from BBEdit when you select this script from
-- the Text Filters submenu
--
-- I like putting the logic in this handler, which lets me easily test
-- my script in AppleScript Editor before using it in a text filer
-- like so
(*
@rwilcox
rwilcox / notify_me_when_in_jaconda_chat.markdown
Created October 25, 2012 19:05
Notify Me when my name is said in a Jaconda based Adium chat

There's a Adium plugin, pipeevent (Github), that lets you send stuff to Unix commands.

Adium XTras page for this says the plugin has been banned, so don't try. Just download it from the Files section of the Github page above

Original blog entry announcing this

People report issues with Adium crashing on message receive, but I don't have this issue (Adium 1.5.3)

Note: this works just fine with the Mute settings described above!!!

@rwilcox
rwilcox / overruns_part_of_contract.markdown
Created September 19, 2012 16:50
Budgetary overruns

Freelancer friends:

I'm debating adding this subsection to my contracts. I'm interested in advice: is this a good idea, bad idea, or how have you handled the situation in the past?

Budgetary Overruns

Because of agile feedback loops with Client, Software Project may to change greatly from initial concept to completion. Drastic changes may affect the initial budgetary guess, especially if priority or functionality of the project can not be shifted.

At Developer's discretion, a budgetary grace of 25% of the initial budgetary guess (or $2,000, whichever is lesser) can be taken into account. This acknowledges potential estimation errors in the proposal made by Developer, or the mercurial nature of some software development projects. If, by best efforts of Developer and Client the project is a little bit over, you'll be charged the initial budgetary guess amount.

@rwilcox
rwilcox / Textile.sh
Created September 18, 2012 12:27 — forked from foliovision/Textile.sh
Working version of Textile.sh filter for BBEdit/TextWrangler. http://foliovision.com/2011/11/08/textile-editing-bbedit . Tested and mods made for BBEdit 10
#!/usr/bin/php -q
<?php
// set to true to avoid ' and " converting to HTML special characters
@define('skip_glyphs', false);
// 3+ uppercase span tag is commented out, as everyone hates it
// instruction on how to use it available here: http://foliovision.com/2011/11/08/textile-editing-bbedit
// define these before including this file to override the standard glyphs