Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| from tastypie import fields | |
| from tastypie.authentication import Authentication | |
| from tastypie.authorization import Authorization | |
| from tastypie.bundle import Bundle | |
| from tastypie.exceptions import NotFound | |
| from tastypie.resources import Resource | |
| # a dummy class representing a row of data | |
| class Row(object): |
| // Для отправки вормы использовать jQuery ajax forms (http://jquery.malsup.com/form/) | |
| // Показывает ошибки формы | |
| function show_form_errors(form, error_json) | |
| { | |
| clear_form_errors(form); | |
| for (name in error_json) { | |
| var elem = form.find('input[name=' + name + '], textarea[name=' + name + ']'); | |
| elem.closest('.control-group').addClass('error'); | |
| elem.parent().prepend($('<span class="help-inline">*' + error_json[name] + '</span>')); | |
| } |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| angular.module('reveal.directives', []) | |
| .directive('zurbReveal', function($revealService, $log){ | |
| return { | |
| restrict: 'A', | |
| link: function postLink(scope, element, attrs) { | |
| scope.$watch(attrs.zurbReveal, function(url){ | |
| if(typeof(url)=='undefined') url = attrs.zurbReveal; | |
| element.bind( "click", function(){ | |
| scope.$emit("event:modal-request", url, scope, attrs.revealOptions); | |
| }); |
| angular.module("Validation", ["ngMessages"]).constant("validationClassConfig", | |
| validClass: "has-success" | |
| invalidClass: "has-error" | |
| ) | |
| .service("formValidation", -> | |
| setDirtyField = (field) -> | |
| field.$setDirty() | |
| localValidateForm: (form) -> | |
| _formValidate = (innerForm) -> |
| /*placeholder ellipsis*/ | |
| input[placeholder] {text-overflow:ellipsis;} | |
| input::-moz-placeholder {text-overflow:ellipsis;} | |
| input:-moz-placeholder {text-overflow:ellipsis;} | |
| input:-ms-input-placeholder {text-overflow:ellipsis;} | |
| /*Hide placeholder in focus*/ | |
| :focus::-webkit-input-placeholder {color: transparent} | |
| :focus::-moz-placeholder {color: transparent} | |
| :focus:-moz-placeholder {color: transparent} |
| # Создание веток master/developer/release/hotfix | |
| git flow init | |
| # Начинаем работать над функционалом feature1 (ответвление от develop) | |
| git flow feature start feature1 | |
| # делаем изменения | |
| git add ...изменения... | |
| git commit -m "изменения для feature1" | |
| # Эта команда сделает слияние feature1 с develop и удалит ветку |
| import { Directive, Input, HostListener, Renderer, ElementRef } from '@angular/core'; | |
| @Directive({ selector: '[hoverClass]' }) | |
| export class HoverClassDirective { | |
| @Input() | |
| hoverClass: string; | |
| constructor( | |
| public elementRef: ElementRef, |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |