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
<h2 class="example">Example 1</h2> | |
<p class="example">Create simple play/pause + resize controls for a video:</p> | |
<div class="example_code notranslate"> | |
<br> | |
<div style="text-align:center"> | |
<button onclick="playPause()">Play/Pause</button> | |
<button onclick="makeBig()">Big</button> | |
<button onclick="makeSmall()">Small</button> | |
<button onclick="makeNormal()">Normal</button> | |
<br><br> |
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
//// cancel icon | |
{ | |
//// Bezier 4 Drawing | |
UIBezierPath* bezier4Path = [UIBezierPath bezierPath]; | |
[bezier4Path moveToPoint: CGPointMake(190.93, 36.84)]; | |
[bezier4Path addCurveToPoint: CGPointMake(187.69, 36.84) controlPoint1: CGPointMake(190.03, 37.66) controlPoint2: CGPointMake(188.59, 37.66)]; | |
[bezier4Path addLineToPoint: CGPointMake(182.71, 31.13)]; | |
[bezier4Path addLineToPoint: CGPointMake(177.73, 36.84)]; | |
[bezier4Path addCurveToPoint: CGPointMake(174.48, 36.84) controlPoint1: CGPointMake(176.82, 37.66) controlPoint2: CGPointMake(175.39, 37.66)]; |
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
class FormObjectBase < Hashie::Dash | |
extend ActiveModel::Naming | |
def persisted?; false; end | |
def to_key; nil; end | |
end | |
# Пример модели | |
class UserOrganizationForm < FormObjectBase |
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
// https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts | |
!!! | |
%html | |
%head | |
... | |
// stylesheet loads first | |
= stylesheet_link_tag 'application' | |
// main javascript file is loaded in parallel with stylesheet | |
= javascript_include_tag 'application' |
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
# app/assets/javascripts/password-toggle.js.coffee | |
$ -> | |
$(".j-password-toggle").on "click", -> | |
icon = $(this).find("[class*='icon']") | |
icon.toggleClass('fontello-icon-eye') | |
icon.toggleClass('fontello-icon-eye-off') | |
input = $(this).closest('form').find('.j-password-input') | |
type = input.attr("type") | |
if type is "text" |
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
$ -> | |
submitByKey('.j-submit-by-key') | |
$ -> | |
messagesEl = $('.j-messages-list') | |
scrollToBottom messagesEl | |
$('#new_message_form') | |
.on 'ajax:success', (evt, data, status, xhr) -> | |
messagesEl.append xhr.responseText |
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
source 'http://rubygems.org' | |
gem 'cocoapods', '>=0.17.0.rc5' |
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
@import "compass/css3/transition"; | |
.btn-name { | |
@include transition( color 0.2s ease-in, background .2s ease-in ); | |
} | |
.btn-state-1 { | |
color: #000; | |
background: #eee; | |
} |
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
class App.Views.SomeView extends Marionette.ItemView | |
template: JST['template'] | |
templateHelpers: -> Convead.Helpers.ApplicationHelpers |
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
<% predefined_colors = Settings.predefined_colors.map{ |k,v| "(#{k} #{v})" }.join(',') %> | |
@each $color in <%= predefined_colors %> | |
.segment-color-#{nth($color,1)} | |
background: nth($color,2) | |
&:hover | |
background: lighten(nth($color,2),3%) | |
OlderNewer