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
SELECT | |
t.name AS TriggerName, | |
o.name AS TableName, | |
t.type_desc AS TriggerType, | |
m.definition AS TriggerDefinition | |
FROM | |
sys.triggers t | |
INNER JOIN | |
sys.objects o ON t.parent_id = o.object_id | |
INNER JOIN |
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
<?php | |
namespace App\Providers; | |
use Illuminate\Cache\RateLimiting\Limit; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\RateLimiter; | |
use Illuminate\Support\Facades\Route; |
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
SELECT s.Name AS SchemaName, | |
t.NAME AS TableName, | |
p.rows AS RowCounts, | |
CAST(SUM(a.total_pages) * 8 / 1024.0 AS DECIMAL(10, 2)) AS TotalSpaceMB | |
FROM sys.tables t | |
INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id | |
INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id | |
INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id | |
LEFT OUTER JOIN sys.schemas s ON t.schema_id = s.schema_id | |
WHERE t.TYPE = 'U' |
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
<?php | |
require __DIR__ . './vendor/autoload.php'; | |
$app = require_once __DIR__ . './bootstrap/app.php'; | |
$kernel = $app->make(\Illuminate\Contracts\Http\Kernel::class); | |
$response = $kernel->handle( | |
$request = \Illuminate\Http\Request::capture() | |
); |
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
$env:DOTNET_WATCH_RESTART_ON_RUDE_EDIT = 1 | |
# Or | |
dotnet watch run --non-interactive |
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
<template> | |
<template v-for="(_, slotName) in $slots" v-slot:[slotName]="scope"> | |
<slot :name="slotName" v-bind="scope" /> | |
</template> | |
</template> |
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
var _backgroundJobClient = Substitute.For<IBackgroundJobClient>(); | |
await _someService.MethodThatEnqueueSomething("idXXX"); | |
_backgroundJobClient.Received() | |
.Create( | |
Arg.Is<Job>( | |
job => job.Type == typeof(MyJobClass) | |
&& job.Args[0].ToString() == "idXXX" | |
), |
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
import { useEffect, useState } from 'react'; | |
export function useScrollByDrag({ | |
elementToScroll, | |
scrollVelocity = 1, | |
}: { | |
elementToScroll: HTMLElement | null; | |
scrollVelocity?: number; | |
}) { | |
useEffect(() => { |
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
import { defineStore, getActivePinia } from "pinia"; | |
const activePinia = getActivePinia(); | |
if (!activePinia) return; | |
Object.entries(activePinia.state.value).forEach(([storeName, state]) => { | |
console.debug("Resetting store", storeName); | |
const storeDefinition = defineStore(storeName, state); | |
const store = storeDefinition(activePinia); |
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
<?php | |
namespace App\Constants; | |
/** | |
* Classe com todos os UFs de cada estado do Brasil | |
*/ | |
class UfStatesBrazil | |
{ | |
public const ACRE = 'AC'; |
NewerOlder