Skip to content

Instantly share code, notes, and snippets.

@hitode909 hitode909/lgtm
Created Oct 22, 2013

What would you like to do?
#! /usr/bin/env ruby
# Copy random LGTM to clipboard
require 'open-uri'
require 'nokogiri'
require 'shellwords'
doc = Nokogiri open('')
lgtm ='textarea').text
if `which pbcopy`.length > 0
system "echo #{Shellwords.escape(lgtm)} | pbcopy"
puts lgtm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.