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
TypeScript 11 hrs 45 mins █████████▋░░░░░░░░░░░ 46.2% | |
C# 5 hrs 5 mins ████▏░░░░░░░░░░░░░░░░ 20.0% | |
Markdown 2 hrs 46 mins ██▎░░░░░░░░░░░░░░░░░░ 10.9% | |
Vue.js 2 hrs 37 mins ██▏░░░░░░░░░░░░░░░░░░ 10.3% | |
PHP 1 hr 9 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5% |
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
<# | |
Usage on Linux: | |
pwsh ./convertImagesToBase64.ps1 /home/user/folder/images | |
Usage on Windows: | |
./convertImagesToBase64.ps1 C:/Path/To/Imagens | |
#> | |
$folderPath = $args[0] |
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
<# | |
OBS: | |
The AsByteStream parameter was introduced in Windows PowerShell 6.0 | |
If your PowerShell version (run `(Get-Host).Version` to find out) is lower than 6 then use the version for Powershell 5.1: | |
#> | |
$pathToImage = "/home/user/development/image.png" | |
# For Powershell 5.1 | |
[String]$base64 = [convert]::ToBase64String((Get-Content $pathToImage -Raw -Encoding Byte)) |
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
using System; | |
using System.Collections; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
namespace Project.Base | |
{ | |
public static class Request |
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" | |
), |
NewerOlder