Skip to content

Instantly share code, notes, and snippets.

View AlexanderKozhevin's full-sized avatar
💭
working

Alexander Kozhevin AlexanderKozhevin

💭
working
View GitHub Profile
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
var gulp = require('gulp');
// gulp-load-plugins include all packages beginning with "gulp"
// To use packages which don't begin with *gulp* - add their name in *pattern* property.
// This little thing helps us to minify number of declarations.
var $ = require('gulp-load-plugins')({
rename: {
'main-bower-files': "bowerfiles",
'sassdoc': 'sassdoc'
},
app.config (RestangularProvider) ->
RestangularProvider.setBaseUrl('http://app.vnedesign.ru/api')
RestangularProvider.setDefaultHeaders({'Content-Type': 'application/json'});
angular.module('eagle').factory 'second_angular', (Restangular) ->
return Restangular.withConfig (RestangularConfigurer) ->
RestangularConfigurer.setBaseUrl('http://eagletest.media.test.eagleplatform.com/api/');
RestangularConfigurer.setRequestSuffix('.json');
RestangularConfigurer.setDefaultHeaders({'Content-Type': 'application/json'});
RestangularConfigurer.setDefaultHttpFields({withCredentials: true});
RestangularConfigurer.addResponseInterceptor (data, operation, what, url, response, deferred) ->
if (data.data)
if_records = url.length - url.lastIndexOf('records')
if (if_records == 7) or (url.lastIndexOf('records/search')!=-1)
var Nightmare = require('nightmare');
var Screenshot = require('nightmare-screenshot');
var nightmare = new Nightmare();
nightmare.goto('url');
nightmare.use(Screenshot.screenshotSelector('element.png', 'img[id="yw0"]'));
nightmare.run();
var RecordItem = new Schema({
Email : {type: String},
Key : {type: String},
Username : {type: String},
MPHEmail : {type: String},
API : {type: String},
AccountType : {type: String},
card : {type: String}
});
import {Component, ElementRef, OnInit, Input, Output, EventEmitter,OnChanges} from 'angular2/core';
@Component({
selector: 'phone',
template: `
<input type="tel" class="phone form-control" value="{{ inputmodel }}" (keyup)="onChange($event)">
`
})
import {Component} from 'angular2/core';
import {Phone} from './phone';
@Component({
selector: 'hello-world',
template: `
<label>Phone international:</label>
<hr>
<!DOCTYPE html>
<html>
<body>
<p>Click the button to loop through a block of code as long as i is less than 10.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<html>
<head>
<title>API Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken = "<your agent's client access token>";
var baseUrl = "https://api.api.ai/v1/";