⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
# and made a lot more robust by me | |
# this implementation uses erb by default. if you want to use any other template mechanism | |
# then replace `erb` on line 13 and line 17 with `haml` or whatever | |
module Sinatra::Partials | |
def partial(template, *args) | |
template_array = template.to_s.split('/') | |
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
options = args.last.is_a?(Hash) ? args.pop : {} | |
options.merge!(:layout => false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin gradient($start, $end, $type: "vertical") { | |
@if "vertical" == $type { | |
background: -webkit-gradient(linear, left top, left bottom, from($start), to($end)); | |
background: -moz-linear-gradient(top, $start, $end); | |
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#{$start}', EndColorStr='#{$end}'); | |
} @else if "horizontal" == $type { | |
background: -webkit-gradient(linear, left top, right top, from($start), to($end)); | |
background: -moz-linear-gradient(left, $start, $end); | |
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#{$start}', EndColorStr='#{$end}', GradientType=1); | |
} @else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://compass-style.org/reference/compass/helpers/sprites/ | |
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true) | |
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file | |
$sprite-image: sprite-file($map, $sprite) | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url | |
$sprite-map: sprite-url($map) | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://compass-style.org/reference/compass/helpers/sprites/ | |
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true) { | |
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file | |
$sprite-image: sprite-file($map, $sprite); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url | |
$sprite-map: sprite-url($map); | |
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!
OlderNewer