Skip to content

Instantly share code, notes, and snippets.

View thiagosilr's full-sized avatar

Thiago Resende thiagosilr

View GitHub Profile
@thiagosilr
thiagosilr / clearPath.ps1
Created March 27, 2023 14:26
PowerShell remove todos arquivos de um diretório
$remover = "C:\Users\thiago.resende\AppData\Roaming\Microsoft\Teams"
Remove-Item -Recurse -Force $remover
EXEC sp_addrolemember N'db_owner', N'usuario'
SELECT
DP1.name AS DatabaseRoleName,
isnull (DP2.name, 'No members') AS DatabaseUserName
FROM
sys.database_role_members AS DRM
RIGHT OUTER JOIN sys.database_principals AS DP1
ON DRM.role_principal_id = DP1.principal_id
LEFT OUTER JOIN sys.database_principals AS DP2
ON DRM.member_principal_id = DP2.principal_id
WHERE
@thiagosilr
thiagosilr / jquery.weather.br.config-basic.js
Created April 18, 2018 22:42
Configuração básica do plugin jquery.weather.br
<div id="weather"></div>
<script>
$(function() {
$('#weather').weather({
locationLat: -19.9267427,
locationLon: -43.9601151
});
});
</script>
$(function() {
$('#weather').weather({
geoLocation: true,
locationLat: -19.9267427,
locationLon: -43.9601151,
lang: 'pt',
unit: 'c',
format: 'today',
pathFolderLocales: 'path/locales'
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Weather BR - Demo</title>
<!-- jQuery Weather CSS -->
@thiagosilr
thiagosilr / exemploPdf.php
Created October 25, 2013 19:02
exemploPdf
<?php
# Aqui incluímos a classe html2pdf.
include('html2pdf/html2pdf.class.php');
/* Guardamos na variável $html o html que queremos converter.
* Linha 13 - Incluímos o nosso arquivo css (exemploPdf.css)
* Linha 15 - Temos uma div de id = logo que formatamos a mesma
* com uma altura, largura, uma borda azul e uma imagem
* de background.
* Linha 16 - Temos agora um span de id = texto que formatamos
@thiagosilr
thiagosilr / exemploPdf.css
Last active December 26, 2015 13:39
Css exemploPdf
#logo
{
border: 1px solid blue;
width: 213px;
height: 70px;
background: url(img/logo.gif) no-repeat;
}
#texto
{
@thiagosilr
thiagosilr / pluginHtml2PdfWordpress.php
Last active September 9, 2016 11:28
Plugin Html2Pdf Wordpress
<?php
/**
* Plugin Name: Html2Pdf
*/
include('html2pdf/html2pdf.class.php');
register_activation_hook(__FILE__, array('HTML2PDF'));
@thiagosilr
thiagosilr / paisesPortuguesIngles.sql
Created November 9, 2012 13:30
Tabela MYSQL com o nome de todos os países em Português / Inglês
--
-- Estrutura da tabela `pais`
--
CREATE TABLE IF NOT EXISTS `pais` (
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`paisNome` varchar(50) NOT NULL,
`paisName` varchar(50) NOT NULL,
PRIMARY KEY (`paisId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ;