This file contains hidden or 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 check = { | |
| description : 'Description', | |
| title : 'Title', | |
| image : 'Image', | |
| canonical : 'Canonical', | |
| 'og:image' : 'Open graph image', | |
| 'twitter:image' : 'Twitter Image' | |
| }, | |
| ommit = { |
This file contains hidden or 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
| // Function declaration | |
| foo(); // It works! :D | |
| function foo() { | |
| console.log('I got hoisted, so basically you can call me wherever you want to. Even before my declaration.'); | |
| } | |
| // Function Expression |
This file contains hidden or 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
| @width: 100%; | |
| @column-width: @width / 3; | |
| @base-color: #cfcfcf; | |
| .container { | |
| width: @width; | |
| .column { | |
| width: @column-width; | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
| echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee -a /etc/apt/sources.list.d/10gen.list | |
| sudo apt-get update | |
| sudo apt-get install -y git mongodb-org nodejs npm | |
| curl https://raw.githubusercontent.com/creationix/nvm/v0.18.0/install.sh | bash | |
| curl https://install.meteor.com | sudo sh |
This file contains hidden or 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
| // Modified version of http://jsfiddle.net/6K7Kd/68/ to support parameters, and inmediate execution | |
| (function (/*window*/) { | |
| 'use strict'; | |
| function debounceService($rootScope, $browser, $q, $exceptionHandler) { | |
| var deferreds = {}, | |
| methods = {}, | |
| uuid = 0; |
This file contains hidden or 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 { Component, Input, OnInit } from '@angular/core'; | |
| @Component({ | |
| selector: 'my-name', | |
| template: ` | |
| <h2>First name: {{name}} ({{_name}})</h2> | |
| `, | |
| }) | |
| export class ChildComponent implements OnInit { | |
| private _name: string; |
This file contains hidden or 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 { | |
| Component, Input, | |
| OnInit, | |
| OnChanges, SimpleChanges, SimpleChange | |
| } from '@angular/core'; | |
| @Component({ | |
| selector: 'my-last-name', | |
| template: ` | |
| <h2>Last name: {{_name}} ({{ name }})</h2> |
This file contains hidden or 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 { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'my-app', | |
| template: ` | |
| <my-child-component [prop1]="name"></my-child-component> | |
| `, | |
| }) | |
| export class App { | |
| name: string = "Carlos"; | |
| constructor() {} |
This file contains hidden or 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 { Component, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'my-child-component', | |
| template: ` | |
| <p>{{ prop1 }}</p> | |
| `, | |
| }) | |
| export class ChildComponent { | |
| @Input() prop1: string; | |
| constructor() {} |
This file contains hidden or 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 strict'; | |
| const Waterline = require('waterline'); | |
| let _waterline; | |
| const upper = (str) => str[0].toUpperCase() + str.slice(1); | |
| const isInvalid = (model) => (!model.identity); | |
| const init = async ({ models, adapters, connections }) => { | |
| if (_waterline) return Promise.resolve(_waterline); |
OlderNewer