This file contains 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
1) verifique se ja possui alguma chave publica habilitada | |
ssh -vT [email protected] | |
2) caso nao tenha, registre uma em /home/<you>/.ssh | |
sh-keygen -t rsa -C "[email protected]" -b 4096 |
This file contains 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
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' | |
sudo apt update | |
sudo apt install linux-image-generic linux-image-extra-virtual | |
sudo apt install docker.io |
This file contains 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
// Acessa informações de metricas do MSSQL | |
https://github.com/awaragi/prometheus-mssql-exporter |
This file contains 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
<UserSettings> | |
<ApplicationIdentity version="11.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"> | |
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"> | |
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue> | |
<PropertyValue name="AutoloadExternalChanges">false</PropertyValue> | |
<PropertyValue name="CheckForConsistentLineEndings">true</PropertyValue> | |
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue> | |
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue> |
This file contains 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
// Create HTTP interceptor (https://docs.angularjs.org/api/ng/service/$http - Interceptors topic) | |
App.factory('AuthInterceptor', ['$window', '$q', '$location', function ($window, $q, $location) { | |
return { | |
request: function (config) { | |
config.headers = config.headers || {}; | |
config.headers.ContentType = 'application/json; charset=UTF-8'; | |
if (myGlobalVar.getToken()) { | |
// populate header custom fields | |
config.headers.Authorization = 'Bearer ' + myGlobalVar.getToken().access_token; | |
config.headers.iduser = myGlobalVar.getToken().iduser; |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="BeforeBuild"> | |
<!-- https://stackoverflow.com/a/6472195/2076784 --> | |
<PropertyGroup> | |
<Year>$([System.DateTime]::Now.ToString("yyyy"))</Year> | |
<Month>$([System.DateTime]::Now.ToString("MM"))</Month> | |
<Date>$([System.DateTime]::Now.ToString("dd"))</Date> | |
<Time>$([System.DateTime]::Now.ToString("HHmm"))</Time> | |
<AssemblyFileVersionAttribute>[assembly:System.Reflection.AssemblyFileVersion("$(Year).$(Month).$(Date).$(Time)")]</AssemblyFileVersionAttribute> |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using SAP.Middleware.Connector; | |
namespace exemplo | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Client | |
{ | |
class Program |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Host | |
{ |
This file contains 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
-- Pegar a data removendo a HH:MM:SS:mmm | |
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) | |
-- ou | |
SELECT convert(DATETIME, floor(convert(FLOAT(24), GETDATE()))) | |
-- SQL Server Date Formats (http://www.sql-server-helper.com/tips/date-formats.aspx) | |
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 103), '/', '') AS [DDMMYYYY] | |
-- Convert rows in concatenaded string list | |
SELECT STUFF((SELECT ',''' + field + '''' |