Skip to content

Instantly share code, notes, and snippets.

View orlaqp's full-sized avatar

Orlando Quero orlaqp

View GitHub Profile
@orlaqp
orlaqp / introrx.md
Created February 16, 2019 15:54 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@orlaqp
orlaqp / launch.json
Created July 21, 2018 14:19
VS Code configuration to debug Jest test when working on a NodeJS app using Typescript
{
"name": "Jest All",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--config",
"${workspaceRoot}/config/jest.json",
"--runInBand"
],
// Apollo
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import { ApolloModule } from 'angular2-apollo';
// by default, this client will send queries to `/graphql` (relative to the URL of your app)
const client = new ApolloClient({
networkInterface: createNetworkInterface({
uri: 'http://localhost:8081'
}),
});
DECLARE @databaseName varchar(50), @novaID nvarchar(50), @runAt int, @offSet int, @sqlString varchar (max), @isShutdown int, @dateStart datetime, @dateEnd datetime;
DECLARE @now as DATETIME, @day as INT, @month as INT, @year as INT;
DECLARE @startDate AS DATE, @endDate AS DATE, @limitDate AS DATE;
DECLARE @FromDate AS DATETIME;
DECLARE @ToDate AS DATETIME;
DECLARE @CurrentDate AS DATETIME;
-- Define a cursor with all companies in POS_Main..Users table
DECLARE CompaniesCursor CURSOR FOR
// Component
import { Component, OnInit } from '@angular/core';
import { REACTIVE_FORM_DIRECTIVES, FormGroup } from '@angular/forms';
import { MATERIAL_FORM } from '../../../../../dist/ng2-materialform';
@Component({
selector: 'demo-checkbox',
directives: [MATERIAL_FORM, REACTIVE_FORM_DIRECTIVES, FormGroup],
template: require('./checkbox.html'),
})
import { provideRouter, RouterConfig } from '@angular/router';
import {DemoRoute} from './components/demo/demo';
import {SupportRoute} from './components/support/support';
export const routes: RouterConfig = [
{ path: '', component: DemoRoute },
{ path: 'components', component: DemoRoute },
{ path: 'support', component: SupportRoute },
];
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { OnChanges, SimpleChanges } from '@angular/core';
import { EventEmitter } from '../../facade/async';
import { FormArray, FormControl, FormGroup } from '../../model';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HKT4823JM0U5": An unhandled exception was thrown by the application.
System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught) ---> System.AggregateException: One or more errors occurred. (Device not configured) ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: Device not configured
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
at System.Net.Dns.<>c.<GetHostAddressesAsync>b__14_1(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1
@orlaqp
orlaqp / gist:f8ab1c9dfb374ea0e839d10cf5f7f4a6
Created July 4, 2016 16:32
Startup for my first ASP .NET Core 1.0
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Security.Models;
using OpenIddict;