Skip to content

Instantly share code, notes, and snippets.

@ratbeard
Created September 1, 2009 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratbeard/178879 to your computer and use it in GitHub Desktop.
Save ratbeard/178879 to your computer and use it in GitHub Desktop.
Here is a haml file with some styles and a little javascript:
!!!
%html
%head
%title Whats up dog??
%style
:sass
body
:text-align center
.question
:font-weight bold
%body
%h1 Best Page
%p
I love dogz. So much.
.question do you?
:javascript
var place = "pound";
alert("Welcome to the " + place);
Copy the above code.
Open terminal.
Try the command `pbpaste` will echo out whats in your clipboard.
Instead of echoing to the terminal, we can redirect it to echo to a file with `>`.
Lets convert the above into html:
cd /tmp
pbpaste > dog.haml
haml dog.haml dog.html
open dog.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment