Skip to content

Instantly share code, notes, and snippets.

@renant
renant / AngularJS-Windows-Authentication.authentication.js
Created December 22, 2015 19:12 — forked from definitelynotsoftware/AngularJS-Windows-Authentication.authentication.js
AngularJS Windows Authentication Service using .NET Web API and Hot Towel template
angular.module('app')
.factory("authentication", ["$http", "$q", "$window", authentication]);
function authentication($http, $q, $window) {
var user;
function login() {
// check if the user already exists for this session
@renant
renant / TokenFirebaseVerify.cs
Last active August 18, 2021 18:57
Example to validate firebase token in C#
using System;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Net.Http;
using System.Security.Claims;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
@renant
renant / sql
Created March 11, 2019 17:21
Gerador de Map do entity a partir de uma tabela
declare @schema varchar(100) = 'schema'
declare @tableName varchar(100) = 'tableName'
declare @objectId bigint;
select @objectId = t.object_id
from sys.tables t
inner join sys.schemas s on s.schema_id = t.schema_id
where s.name = @schema and t.name = @tableName
@renant
renant / sql
Created March 11, 2019 17:21
Gerador de Map do entity a partir de uma tabela
declare @schema varchar(100) = 'schema'
declare @tableName varchar(100) = 'tableName'
declare @objectId bigint;
select @objectId = t.object_id
from sys.tables t
inner join sys.schemas s on s.schema_id = t.schema_id
where s.name = @schema and t.name = @tableName
@renant
renant / sql
Created March 11, 2019 17:21
Gerador de Map do entity a partir de uma tabela
declare @schema varchar(100) = 'schema'
declare @tableName varchar(100) = 'tableName'
declare @objectId bigint;
select @objectId = t.object_id
from sys.tables t
inner join sys.schemas s on s.schema_id = t.schema_id
where s.name = @schema and t.name = @tableName
@renant
renant / GeradorMapEntityFromTable
Created March 11, 2019 17:21
Gerador de Map do entity a partir de uma tabela
declare @schema varchar(100) = 'schema'
declare @tableName varchar(100) = 'tableName'
declare @objectId bigint;
select @objectId = t.object_id
from sys.tables t
inner join sys.schemas s on s.schema_id = t.schema_id
where s.name = @schema and t.name = @tableName
@renant
renant / docker-compose.yml
Last active May 6, 2019 13:52
Docker compose com ambientes que gosto de utilizar
version: "3.4"
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
restart: always
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=123Aa321
- MSSQL_COLLATION=Latin1_General_CI_AS