- ssh user@your_ip
- Generar llave
ssh-keygen -b 4096(dentro de .ssh) - Enviar llave al server
ssh-copy-id -i .ssh/name.pub user@your_ip - Conectar:
ssh user@your_ip
- update
apt-get update
| getAll(){ | |
| return {"results":[{"gender":"female","name":{"title":"miss","first":"آنیتا","last":"نكو نظر"},"location":{"street":"4842 شهید رحمانی","city":"قزوین","state":"گلستان","postcode":88633},"email":"آنیتا.نكونظر@example.com","login":{"username":"beautifulmouse467","password":"prayers","salt":"jCIISMlp","md5":"39762c237b92dd7b8e392669103afdcc","sha1":"1fd5de475c3e607247634fb512e079e143481de3","sha256":"d6945d3a277027ce84afca2fce0a78b32d3f518df0c90fb5c478367a2ae63e4d"},"dob":"1957-12-19 17:41:58","registered":"2002-06-12 01:25:09","phone":"021-59610882","cell":"0947-822-5292","id":{"name":"","value":null},"picture":{"large":"https://randomuser.me/api/portraits/women/17.jpg","medium":"https://randomuser.me/api/portraits/med/women/17.jpg","thumbnail":"https://randomuser.me/api/portraits/thumb/women/17.jpg"},"nat":"IR"},{"gender":"male","name":{"title":"mr","first":"brandão","last":"lopes"},"location":{"street":"6004 rua são pedro ","city":"bragança","state":"santa catarina","postcode":77776},"email":"brand |
| let loading = this.loadingCtrl.create({ | |
| spinner: 'hide', | |
| content: ` | |
| <div class="custom-spinner-container"> | |
| <div class="custom-spinner-box"></div> | |
| </div>`, | |
| duration: 5000 | |
| }); |
| import { TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; | |
| import { YourService } from './your.service'; | |
| describe('Provider: YourService', () => { | |
| //Arrange | |
| beforeEach(() => { | |
| TestBed.configureTestingModule({ | |
| providers: [ | |
| { provide: YourService, useClass: YourService }, |
| export class YourPage { | |
| constructor( | |
| ... | |
| private platform: Platform, | |
| ) { | |
| if(this.platform.is('cordova')){ | |
| this.initPush(); | |
| } | |
| } |
| //component ts | |
| @Component({ | |
| selector: 'your-component', | |
| templateUrl: 'your-component.html', | |
| }) | |
| export class YourComponent { | |
| @Input() photo: string; | |
| constructor( |
| getVendedores(){ | |
| let vendedores = []; | |
| let sizeVendedores = 0; | |
| return new Promise((resolve, reject)=>{ | |
| this.fireDatabase.list('/supervidores/idSupervidor/VendedoresList') | |
| .subscribe(list =>{ | |
| sizeVendedores = list.length; | |
| list.forEach(vendedor=>{ | |
| let imei = vendedor.imei; | |
| this.fireDatabase.object('/vendedores/'+imei) |
| private checkSession(){ | |
| if(this.auth.isLoggedIn()){ | |
| this.navMaster.setRoot('HomePage'); | |
| }else{ | |
| this.navMaster.setRoot('LoginPage'); | |
| } | |
| this.splashScreen.hide(); | |
| } |
| private generateMarkers(latitude:number, longitude: number, limit: number){ | |
| let markers: any[] = []; | |
| for(let i =0;i<limit;i++){ | |
| markers.push({ | |
| title: 'hola ' + i, | |
| position: { | |
| lat: latitude + Math.random() * (1 - (-1)) + (-1), | |
| lng: longitude + Math.random() * (1 - (-1)) + (-1) | |
| } | |
| }); |
| image: node:6.9.4 | |
| pipelines: | |
| branches: | |
| master: | |
| - step: | |
| script: | |
| - apt-get update; apt-get install -y gettext-base; | |
| - echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list | |
| - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
| - set -x && apt-get update && apt-get install -y xvfb google-chrome-stable |