Skip to content

Instantly share code, notes, and snippets.

@JamesChevalier
Created December 7, 2012 15:42
Show Gist options
  • Save JamesChevalier/4234043 to your computer and use it in GitHub Desktop.
Save JamesChevalier/4234043 to your computer and use it in GitHub Desktop.
Shakespeare Insult Kit
#!/usr/bin/env ruby -wKU
# Paste this code into a TextExpander snippet to have the Shakespeare Insult Kit a keystroke away
# Just set the Content of the TextExpander snippet to 'Shell Script', and give it an abbreviation
# Shakespeare Insult Kit: http://www.pangloss.com/seidel/shake_rule.html
print "Thou " + ["artless","bawdy","beslubbering","bootless","churlish","cockered","clouted","craven","currish","dankish","dissembling","droning","errant","fawning","fobbing","froward","frothy","gleeking","goatish","gorbellied","impertinent","infectious","jarring","loggerheaded","lumpish","mammering","mangled","mewling","paunchy","pribbling","puking","puny","qualling","rank","reeky","roguish","ruttish","saucy","spleeny","spongy","surly","tottering","unmuzzled","vain","venomed","villainous","warped","wayward","weedy","yeasty","cullionly","fusty","caluminous","wimpled","burly-boned","misbegotten","odiferous","poisonous","fishified","Wart-necked"].sample + " " + ["base-court","bat-fowling","beef-witted","beetle-headed","boil-brained","clapper-clawed","clay-brained","common-kissing","crook-pated","dismal-dreaming","dizzy-eyed","doghearted","dread-bolted","earth-vexing","elf-skinned","fat-kidneyed","fen-sucked","flap-mouthed","fly-bitten","folly-fallen","fool-born","full-gorged","guts-griping","half-faced","hasty-witted","hedge-born","hell-hated","idle-headed","ill-breeding","ill-nurtured","knotty-pated","milk-livered","motley-minded","onion-eyed","plume-plucked","pottle-deep","pox-marked","reeling-ripe","rough-hewn","rude-growing","rump-fed","shard-borne","sheep-biting","spur-galled","swag-bellied","tardy-gaited","tickle-brained","toad-spotted","unchin-snouted","weather-bitten","whoreson","malmsey-nosed","rampallian","lily-livered","scurvy-valiant","brazen-faced","unwash'd","leaden-footed","muddy-mettled","pigeon-liver'd","scale-sided","bunch-back'd"].sample + " " + ["apple-john","baggage","barnacle","bladder","boar-pig","bugbear","bum-bailey","canker-blossom","clack-dish","clotpole","coxcomb","codpiece","death-token","dewberry","flap-dragon","flax-wench","flirt-gill","foot-licker","fustilarian","giglet","gudgeon","haggard","harpy","hedge-pig","horn-beast","hugger-mugger","joithead","lewdster","lout","maggot-pie","malt-worm","mammet","measle","minnow","miscreant","moldwarp","mumble-news","nut-hook","pigeon-egg","pignut","puttock","pumpion","ratsbane","scut","skainsmate","strumpet","varlot","vassal","whey-face","wagtail","knave","blind-worm","popinjay","scullian","jolt-head","malcontent","devil-monk","toad","rascal","Basket-Cockle"].sample + "!"
@SmilinBrian
Copy link

Looks like a lot of fun! Unfortunately, as a "script snippets only" user of ruby, my system has only ruby 1.8.7 installed.
Apparently array.sample was added around 1.9, current version is 1.9.3

TextExpander does not pass the exception/error back to the user, even with the -w arg (I'll look into making that happen, at least as an option) so you'll just get an empty snippet expansion if you don't have a more recent ruby installed.

@rjp
Copy link

rjp commented Feb 3, 2013

Swap "sample" for "shuffle.first" and it'll work with 1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment