This file contains hidden or 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 request = new TestRequest( | |
new Uri("http://devslice.net"), | |
Locations.London, | |
Browsers.Chrome) | |
{ | |
// Optional settings | |
EnableAdBlock = true, | |
}; |
This file contains hidden or 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
"actions": { | |
"New_Test_Request": { | |
"inputs": { | |
"body": "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"url\"\r\n\r\nhttp://devslice.net\r\n-----011000010111000001101001--", | |
"headers": { | |
"Authorization": "Basic a2V2aW5AYnJvbnNkaWprLmNvbTozOHExMGG0GmI2CzI1MjdhODGkN2I5MzYxNTZkMzMzNA==", | |
"Content-Type": "multipart/form-data; boundary=---011000010111000001101001" | |
}, | |
"method": "POST", | |
"uri": "https://gtmetrix.com/api/0.1/test" |
This file contains hidden or 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 GTmetrix; | |
using GTmetrix.Http; | |
var connection = Connection.Create("Api_Key", "Username"); |
This file contains hidden or 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
####### Example | Maintain the uri when uploading public images to Azure Blob storage | |
$files = @('https://kraken.io/assets/images/kraken-logotype.png') | |
$result = Optimize-ImageUrlToAzure -FileUrl $files -Key $key -Secret $secret -Wait $true ` | |
-AzureAccount $azureAccount -AzureKey $azureKey -AzureContainer $azureContainer -KeepPath $true | |
$result | format-table | |
# Container name is test | |
# --- https://kraken.blob.core.windows.net/test/assets/images/kraken-logotype.png | |
# Not https://kraken.blob.core.windows.net/test/kraken-logotype.png |
This file contains hidden or 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-Module SQLPS -DisableNameChecking | |
#replace your with your instance name | |
$instanceName = "server\instance"; | |
$srv = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server -ArgumentList $instanceName; | |
$srv.Databases | Where { $_.AutoShrink -eq 'True'} |
This file contains hidden or 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 elixir = require('laravel-elixir'); | |
var gulp = require('gulp'); | |
var gulpUtil = require('gulp-util'); | |
var instrument = require('gulp-instrument'); |
This file contains hidden or 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 request = new OptimizeSetUploadWaitRequest() | |
{ | |
// Request level settings | |
Lossy = true, | |
}; | |
request.AddSet(new ResizeImageSet { | |
// Individual settings | |
Name = "set1", Height = 10, Width = 10, Lossy = false | |
}); | |
request.AddSet(new ResizeImageSet { |
This file contains hidden or 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 connection = ScanRConnection.Create("your_token"); | |
var client = new ScanRClient(connection); | |
var response = client.Scan("C:\\your_location\image.jpg", Language.English); | |
var text = response.Result.Body.Text; |
This file contains hidden or 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
... | |
ResizeImage = new ResizeImage {Height = 100, Width = 100, | |
BackgroundColor = "#ffffff" , Strategy = Strategy.exact, Enhance = true} | |
... |
This file contains hidden or 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
@greaterOrEquals(int(body('Http')['quota_used']), div(mul(90, int(body('Http')['quota_total'])), 100)) |