Skip to content

Instantly share code, notes, and snippets.

@markfeedly
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markfeedly/9210929 to your computer and use it in GitHub Desktop.
Save markfeedly/9210929 to your computer and use it in GitHub Desktop.
simple webapp for the kids
require 'sinatra'
require 'open-uri'
get '/' do
@result = open("http://whatthecommit.com/index.txt").read
erb :index
end
__END__
@@ index
<!DOCTYPE html>
<html>
<head>
<title>Your commit message</title>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/zclip/1.1.2/jquery.zclip.min.js"></script>
<script src="http://hedtek.com/jquery.zclip.html5.js"></script>
</head>
<body>
<p id="commit-message"><%= @result %></p>
<a href=""><i class='fa fa-refresh'></i></a>
|
<a href="#" data-clipboard data-clipboard-target="#commit-message"><i class='fa fa-copy'></i></a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment