Skip to content

Instantly share code, notes, and snippets.

View ennerperez's full-sized avatar
💭
If Coffee Then Code

Enner Pérez ennerperez

💭
If Coffee Then Code
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<!--
***********************************************************************************************
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
SET ANSI_PADDING ON;
GO
IF EXISTS
(
SELECT *
FROM sys.objects
DECLARE @now datetime;
SET @now = GETDATE();
SELECT CONVERT(nvarchar(max), @now, 0) AS output, 0 AS style
UNION
SELECT CONVERT(nvarchar(max), @now, 1), 1
UNION
SELECT CONVERT(nvarchar(max), @now, 2), 2
UNION
USE [master];
GO
SET NOCOUNT ON;
DECLARE @debug BIT= 0;
DECLARE @compression BIT= 1;
DECLARE @shrink BIT= 1;
DECLARE @copyonly BIT= 1;
DECLARE @path NVARCHAR(4000);
DECLARE @key NVARCHAR(MAX)= N'Software\Microsoft\MSSQLServer\'+@@servicename+'';
EXEC master.dbo.xp_instance_regread
DECLARE @target_collation nvarchar(100)= 'Modern_Spanish_CI_AI';
DECLARE @server_collation nvarchar(100)= (SELECT CONVERT(varchar, SERVERPROPERTY('collation')));
DECLARE @db_collation nvarchar(100);
DECLARE @db_name nvarchar(200);
SELECT @db_collation = [collation_name], @db_name = [name]
FROM sys.databases
@ennerperez
ennerperez / .gitattributes
Created September 8, 2016 14:12
.gitattributes for VB6 Projects
# Set the default behavior, in case people don't have core.autocrlf set.
* binary
*.bas text eol=crlf
*.frm text eol=crlf
*.ctl text eol=crlf
*.log text eol=crlf
*.vbp text eol=crlf
*.cls text eol=crlf
*.vbw text eol=crlf
*.dsr text eol=crlf
@ennerperez
ennerperez / ReadabilityHelper.cs
Created March 30, 2017 19:23
Readability Aproach
public static class ReadabilityHelper
{
public static string ToRedable(this long size, string format = "")
{
var result = string.Empty;
if (size >= 100000)
result = htmlHelper.RedableLong(size / 1000) + "K";
else if (size >= 10000)
result = (size / 1000D).ToString("0.#") + "K";
else
@ennerperez
ennerperez / bootstrapper.ps1
Last active April 26, 2017 04:05
[build.cake] Bootstrapper
Param(
[string]$Script = ".\build.cake",
[string]$Target = "Default",
[string]$Configuration = "Release",
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity = "Verbose",
[switch]$Experimental,
[Alias("DryRun","Noop")]
[switch]$WhatIf
)
@ennerperez
ennerperez / LUZ.XSL
Last active May 21, 2017 01:23
Referencias bibliográficas - Universidad del Zulia
<?xml version="1.0" encoding="utf-8"?>
<!--
Stylesheet for Microsoft Word 2007-2016 Bibliography formatting.
Author(s): Enner Pérez (ennerperez@gmail.com)
Copyright: Copyright (c) 2017 Enner Pérez
Permission is hereby granted, free of charge, to any person obtaining a
@ennerperez
ennerperez / BibWord_Stylesheet.XSL
Created May 9, 2017 18:11
BibWord Stylesheet Template
<?xml version="1.0" encoding="utf-8"?>
<!--
Stylesheet for Microsoft Word 2007/2008/2010 Bibliography formatting.
Author(s): Yves Dhondt (yves.dhondt@gmail.com)
Copyright: Copyright (c) 2009 Yves Dhondt
Permission is hereby granted, free of charge, to any person obtaining a