Passo a passo certificado SSL Let’s Encrypt – Windows Server

Segue o passo a passo para a instalação / renovação do SSL no Windows Server. A chave vence dentro de 90 dias

Use o zerossl para converter o arquivo;  https://zerossl.com/free-ssl/#crt

  1. Preencher com a chave Lets encript (domain.key) e o CSR gerado pelo IIS ou por outra ferramenta
  2. Criar o arquivo de verificação no IIS (diretório /.well-known/acme-challenge), como o iis não aceita . no nome do diretório é necessário criar um alias no website com este nome e dar as devidas permissões
  3. Se o iis estiver down dar o start
  4. Baixar o conteúdo do certificado atualizado no site e renomear com a extensão CRT
  5. Abrir o arquivo de certificado e nos detalhes localizar o “thumbprint”, copiar o conteúdo

Como Exportar uma tabela HTML para PDF e EXCEL

<inputtype="button"id="btnExport"value=" Export Table data into Excel "/>
<br/>
<br/>
<div id="dvData">
<table>
   <tr>
   <th>Column One</th>
   <th>Column Two</th>
   <th>Column Three</th>
   </tr>
<tr>
   <td>row1 Col1</td>
   <td>row1 Col2</td>
   <td>row1 Col3</td>
</tr>
<tr>
   <td>row2 Col1</td>
   <td>row2 Col2</td>
   <td>row2 Col3</td>
</tr>
</table>
</div>
<script>
    
$("#btnExport").click(function(e){
        window.open('data:application/vnd.ms-excel,'+ $('#dvData').html());
        e.preventDefault();
});
</script>



Referência: https://pt.stackoverflow.com/questions/120694/como-exportar-uma-tabela-html-para-pdf-e-excel

Melhores Plugins Sublime

Melhores Pluguins Sublime

 

CTRL + SHIFT + P

Escolha a opção: Install Package

O sublime irá listar vários pacotes interessantes como os citados abaixo.

 

PHP.

  • BracketHighlighter
  • Composer
  • DocBlockr
  • Emmet
  • Gist
  • Git
  • GitGutter
  • PHP Codebeautifier
  • PHP Companion
  • PHP Constructors
  • Xdebug Client
  • SublimeCodeIntel
  • CSS-CodeIntel
  • PHP-CodeIntel
  • HTML-CodeIntel
  • JSON-CodeIntel
  • JavaScript-CodeIntel

 

 

Reference: https://medium.com/@juniorb2s/melhores-plugins-sublime-para-php-4b011aa02cdf

Reference SublimeCodeIntel: https://github.com/SublimeCodeIntel/SublimeCodeIntel#using

 

Arquivo Completo

Package Control.sublime-settings User:

{
“bootstrapped”: true,
“in_process_packages”:
[
],
“installed_packages”:
[
“BracketHighlighter”,
“CodeIgniter 2 ModelController”,
“CodeIgniter Snippets”,
“Composer”,
“DocBlockr”,
“Emmet”,
“Gist”,
“Git”,
“GitGutter”,
“Package Control”,
“PHP Codebeautifier”,
“PHP Companion”,
“PHP Constructors”,
“SublimeCodeIntel”,
“CSS-CodeIntel”,
“PHP-CodeIntel”,
“HTML-CodeIntel”,
“JSON-CodeIntel”,
“JavaScript-CodeIntel”,
“Xdebug Client”
]
}

 

 

INSTALAÇÃO

bulb SublimeCodeIntel LSP

This is the experimental fork with Language Server Protocol support of SublimeCodeIntel. The following languages are available:

  • CSS-CodeIntel -> CSS/SCSS/Sass/Less
  • Cpp-CodeIntel -> C/C++/Objective-C/Objective-C++
  • HTML-CodeIntel -> HTML
  • JSON-CodeIntel -> JSON/JSONC
  • JavaScript-CodeIntel -> JavaScript/TypeScript/Node.js
  • Markdown-CodeIntel -> Markdown
  • OCaml-CodeIntel -> OCaml
  • PHP-CodeIntel -> PHP
  • Python-CodeIntel -> Python2/Python3
  • Rust-CodeIntel -> Rust
  • YAML-CodeIntel -> YAML

Installation

For the moment, SublimeCodeIntel LSP isn’t available in Package Control yet, to install you need to directly add repositories as well as adding the installed packages.

From command palette add SublimeCodeIntel and the relevant repositories:

Ex.: Package Control: Add Repository -> https://github.com/Kronuz/SublimeCodeIntel Package Control: Install Package -> SublimeCodeIntel

Package Control: Add Repository -> https://github.com/Kronuz/Python-CodeIntel Package Control: Install Package -> Python-CodeIntel

Or directly modify your Packages/User/Package Control.sublime-settings:

{
	"installed_packages": [
		"SublimeCodeIntel",
		"CSS-CodeIntel",
		"Cpp-CodeIntel",
		"HTML-CodeIntel",
		"JSON-CodeIntel",
		"JavaScript-CodeIntel",
		"Markdown-CodeIntel",
		"OCaml-CodeIntel",
		"PHP-CodeIntel",
		"Python-CodeIntel",
		"Rust-CodeIntel",
		"YAML-CodeIntel"
	],
	"repositories": [
		"https://github.com/Kronuz/SublimeCodeIntel",
		"https://github.com/Kronuz/CSS-CodeIntel",
		"https://github.com/Kronuz/Cpp-CodeIntel",
		"https://github.com/Kronuz/HTML-CodeIntel",
		"https://github.com/Kronuz/JSON-CodeIntel",
		"https://github.com/Kronuz/JavaScript-CodeIntel",
		"https://github.com/Kronuz/Markdown-CodeIntel",
		"https://github.com/Kronuz/OCaml-CodeIntel",
		"https://github.com/Kronuz/PHP-CodeIntel",
		"https://github.com/Kronuz/Python-CodeIntel",
		"https://github.com/Kronuz/Rust-CodeIntel",
		"https://github.com/Kronuz/YAML-CodeIntel"
	]
}


Using

  • Start typing code as usual, autocomplete will pop up whenever it’s available. SublimeCodeIntel will also allow you to jump around symbol definitions even across files with just a click ..and back.

    For Mac OS X:

    • Jump to definition = Control+Click
    • Jump to definition = Control+Command+Alt+Up
    • Go back = Control+Command+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

    For Linux:

    • Jump to definition = Super+Click
    • Jump to definition = Control+Super+Alt+Up
    • Go back = Control+Super+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

    For Windows:

    • Jump to definition = Alt+Click
    • Jump to definition = Control+Windows+Alt+Up
    • Go back = Control+Windows+Alt+Left
    • Manual Code Intelligence = Control+Shift+space

Don’t despair! The first time you use it it needs to build some indexes and it can take more than a few seconds.

It just works!

 

git .gitignore – Como resolver quando o arquivo já foi adicionado

O .gitignore não funciona corretamente após adicionarmos o arquivo ao git (by git add).

Para que o arquivo ou pasta seja ignorado é necessário rodar 2 comandos:

  1. git reset name_of_file (desanexo / desmembra o arquivo e mantem no repositório)
  2. git rm –cached name_of_file (utilize esse comando para remover o arquivo do repositório após pushing).

 

Referencia:

https://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git