This file contains hidden or 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
##usage: newrelicdeploy.ps1 -User Rodolfo -Revision RevisionName -Description Description -Changelog Changes | |
param([String] $User, [String] $Revision, [String] $Description, [String] $Changelog) | |
[console]::OutputEncoding = [text.encoding]::UTF8 | |
$appID = "APPID" | |
$apiKey = "APIKEY" | |
"Sending deploy to New Relic API..." | |
$command = "curl -k -H 'x-api-key:$apiKey' -d 'deployment[application_id]=$appID' --data-urlencode 'deployment[description]=$Description' -d 'deployment[revision]=$Revision' -d 'deployment[changelog]=$Changelog' -d 'deployment[user]=$User' https://api.newrelic.com/deployments.xml" |
This file contains hidden or 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
Dcdiag.exe /v >> temppre_dcdiag.txt | |
#http://technet.microsoft.com/pt-br/library/cc776854(v=ws.10).aspx |
This file contains hidden or 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.IO; | |
using System.Web.Mvc; | |
namespace TDCFrontEnd.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public ActionResult About() | |
{ | |
//Acesso ao Database |
This file contains hidden or 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
[user] | |
name = User | |
email = [email protected] | |
[diff] | |
tool = vsdiffmerge | |
keepBackup = false | |
[difftool] | |
prompt = false | |
keepBackup = false |
This file contains hidden or 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
$Now = Get-Date | |
$Days = "7" | |
$TargetFolder = "C:\Applications\Logs" | |
$Extension = "*.log" | |
$LastWrite = $Now.AddDays(-$Days) | |
$Files = Get-Childitem $TargetFolder -Include $Extension -Recurse | Where {$_.LastWriteTime -le "$LastWrite"} | |
foreach ($File in $Files) |
This file contains hidden or 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
C:\Program Files\IIS Express>iisexpress.exe /path:C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/ASP.NETWebAdminFiles" /port:44444 /clr:4.0 /ntlm | |
http://localhost:44444/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\XXXXX&applicationUrl=/ |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var httpClient = new HttpClient(); | |
var httpContent = new ByteArrayContent(FileToByteArray(@"C:\deborah-secco.jpg")); | |
httpContent.Headers.Add("slug", "deborah-secco.jpg"); | |
HttpResponseMessage response = null; | |
try |
This file contains hidden or 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
<html> | |
<head> | |
</head> | |
<body> | |
<form action="http://thumbor-server/image" enctype="multipart/form-data" method="post"> | |
Upload Image: | |
<input type="file" id="media" name="media" /> | |
<input type="submit" /> | |
</form> | |
</body> |
This file contains hidden or 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
private static void ExportClientesToSolr(List<Cliente> listaDeClientes) | |
{ | |
Startup.Init<Cliente>("http://solr-server:8080/solr/solrcluster/"); | |
ISolrOperations<Cliente> solr = ServiceLocator.Current.GetInstance<ISolrOperations<Cliente>>(); | |
var total = listaDeClientes.Count(); | |
var indice = 0; | |
foreach (var cliente in listaDeClientes) | |
{ | |
indice++; |
This file contains hidden or 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
SELECT top 2000 execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery | |
CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql | |
where execsql.text like '%textoparaprocurar%' | |
ORDER BY execquery.last_execution_time DESC |