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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Backbone.View.prototype.inject = function(viewOptions,options){ | |
var offcialViewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; | |
viewOptions = _.filter(viewOptions,function(item){ | |
return !~_.indexOf(offcialViewOptions,item) | |
}) | |
_.extend(this, _.pick(options, viewOptions)); | |
} | |
// view.inject(['modal'],{modal:modal}) demo |
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
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and | |
installing your bundle as root will break this application for all non-root | |
users on this machine. | |
Fetching gem metadata from https://rubygems.org/........... | |
Fetching additional metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake 10.3.2 | |
Using i18n 0.6.9 | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. |
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
[Getting Started | Semantic UI](http://semantic-ui.com/ "Getting Started | Semantic UI") | |
[Alice - 写样式的更好方式](http://aliceui.org/ "Alice - 写样式的更好方式") | |
[Puerh - 百姓网 UI 库](http://baixing.github.io/Puerh/ "Puerh - 百姓网 UI 库") | |
[UIkit](http://getuikit.com/ "UIkit") | |
[Metro UI CSS](http://metroui.org.ua/ "Metro UI CSS") |
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://semantic-ui.com/ Getting Started | Semantic UI | |
http://aliceui.org/ Alice - 写样式的更好方式 | |
http://baixing.github.io/Puerh/ Puerh - 百姓网 UI 库 | |
http://getuikit.com/ UIkit | |
http://metroui.org.ua/ Metro UI CSS | |
http://aozora.github.io/bootmetro/ bootmetro | |
http://bootsnipp.com/ Home | Bootsnipp.com | |
http://getbootstrap.com/2.3.2/ Bootstrap | |
http://alloyui.com/ AlloyUI | |
http://perka.github.io/backbone-ui/ Backbone UI |
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
var links = $("#glossary li a"); | |
links.each(function() { | |
var linkWidth = $(this).outerWidth(); | |
var canvas = $("<canvas></canvas>"); | |
canvas.attr({width: linkWidth,height: 21}); | |
var context = canvas.get(0).getContext("2d"); | |
// Set up the rounded corners | |
context.lineWidth = 6; |
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
/* code */ | |
p code { | |
background: #efefef; | |
border: 1px solid #eaeaea; | |
font-family: monaco, monospace; | |
font-size: .75em; | |
padding: 2px 8px; | |
-webkit-border-radius: 3px; |
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
#accessibility | |
###Todo | |
- input,select,textarea,fieldset -> aria-labelledby="[id]" | |
- position element -> tabindex="-1" | |
- focusable -> tabindex="0" | |
- add `role` attribute | |
- add `aria-` attribute |
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 |