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
$ports = @(22004, 3000, 3001, 3002, 3003, 8081); | |
$wslAddress = bash.exe -c "ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'"; | |
if ($wslAddress -match '^(\d{1,3}\.){3}\d{1,3}$') { | |
Write-Host "WSL IP address: $wslAddress" -ForegroundColor Green; | |
Write-Host "Ports: $ports" -ForegroundColor Green; | |
} | |
else { | |
Write-Host "Error: Could not find WSL IP address." -ForegroundColor Red; |
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
const m = 4; | |
const n = 3; | |
const matrix = [ | |
[1, 2], | |
[3, 4, 5], | |
[6, 7, 8, 9], | |
]; | |
const arr = []; |
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
AVURLAsset *textURLAsset; | |
NSString *textUri = [_textTracks objectAtIndex:i][@"uri"]; | |
if ([[textUri lowercaseString] hasPrefix:@"http"]) { | |
textURLAsset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:textUri] options:assetOptions]; | |
} else { | |
textURLAsset = [AVURLAsset URLAssetWithURL:[self urlFilePath:textUri] options:nil]; | |
} | |
[textURLAsset loadValuesAsynchronouslyForKeys:@[@"playable",@"tracks"] completionHandler:^{ |
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
function longestSubseq(s1, s2) { | |
const s1Arr = s1.split(''); | |
const s2Arr = s2.split(''); | |
let result = []; | |
while (s1Arr.length) { | |
const tmpResult = []; | |
let startIndex = 0; | |
s1Arr.forEach((s1Char, index) => { |
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
#!/bin/bash | |
for i in {1..650} | |
do | |
if [ $(curl -LI https://virtualland.ru/rg-semenovskiy-park/flats/1-$i -o /dev/null -w '%{http_code}\n' -s) == "200" ]; then | |
echo "https://virtualland.ru/rg-semenovskiy-park/flats/1-$i"; | |
fi | |
done |
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
// Генерация временной ссылки | |
$this->say( | |
"Вот ссылка на файл ".$file->name.":\n". | |
URL::temporarySignedRoute( | |
'download', | |
now()->addMinutes(2), | |
['file' => $file->id] | |
). | |
"Ссылка будет действовать 2 минуты" | |
); |
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
function search(obj, value, path = '') { | |
if (!obj) { | |
return undefined; | |
} | |
if (Array.isArray(obj)) { | |
let found; | |
obj.some((item, index) => { | |
found = search(item, value, `${path}[${index}]`); | |
return found; | |
}); |
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
Show hidden characters
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:recommended", | |
"tslint-config-standard", | |
"tslint-config-prettier", | |
"tslint-config-airbnb", | |
"tslint-react", | |
"tslint-immutable" | |
], |
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
{"lastUpload":"2019-01-09T12:05:59.049Z","extensionVersion":"v3.2.4"} |
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
if ($('#header .button-ugps span').hasClass('choose-city')) { | |
$.ajax({ | |
url: '/index.php?route=ugps/city/get&json=Y', | |
type: 'GET', | |
dataType: 'json', | |
error: function() { | |
return console.error(); | |
}, | |
success: function(res) { | |
if (res.name !== void 0) { |
NewerOlder