Back to GitHub Support Contact GitHub

New Languages Highlighted

CoffeeScript (.coffee)

LotteryDraw: {
  play: ->
    result:   LotteryTicket.new_random()
    winners:  {} (buyer, ticket_list) ->
      ticket_list.each (ticket) ->
        score: ticket.score(result)
        return if score is 0
        winners[buyer] ||= []
        winners[buyer].push([ticket, score]) {}

Objective-J (.j)

+ (id)boxEnclosingView:(CPView)aView
    var box = [[self alloc] initWithFrame:CGRectMakeZero()],
        enclosingView = [aView superview];

    [box setFrameFromContentFrame:[aView frame]];

    [enclosingView replaceSubview:aView with:box];

    [box setContentView:aView];

    return box;

Haml (.haml)

  %h1= @article.title
  %div= @article.body
#id[@article] id
.class[@article] class
#id.class[@article] id class
%div{:class => "article full"}[@article]= "boo"
%div{'class' => "article full"}[@article]= "moo"
%div.articleFull[@article]= "foo"

Sass (.sass)

  :width 15em
  :color #0000ff
      :style dotted
      /* Nested comment
        More nested stuff */
      :width 2px
    :width 100px

    :size 2em
    :weight bold
  :float left
Have feedback on this post? Let @github know on Twitter.
Need help or found a bug? Contact us.


Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more