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 callbackFn = callback && typeof callback ? callback : new Function(); |
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
// ==UserScript== | |
// @name Simple Tampermonkey Script | |
// @version 1.0 | |
// @match https://vk.com/classifieds?w=* | |
// @grant window.close | |
// ==/UserScript== | |
(() => { | |
const domObserver = new MutationObserver((mutations) => { | |
mutations.forEach(mutation => { |
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
* { | |
box-sizing: border-box; | |
} | |
.row::after { | |
content: ""; | |
clear: both; | |
display: table; | |
} |
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 getPagedData({data, page, size}) { | |
const skip = (page * size) - size; | |
return data.slice(skip, size + skip); | |
} |
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 | |
if (!function_exists('getRouteUriByName')) { | |
/** | |
* Get route URI by route name | |
* | |
* @param string $name | |
* @return string | |
* @throws Exception | |
*/ |
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\Mail; | |
use Illuminate\Contracts\Mail\Mailer as MailerContract; | |
use Illuminate\Mail\Mailable as BaseMailable; | |
abstract class Mailable extends BaseMailable | |
{ | |
public function send(MailerContract $mailer) |
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
sudo apt install php7.2-xdebug | |
sudo find / -name 'xdebug.so' | |
sudo gedit /etc/php/7.2/fpm/php.ini | |
sudo gedit /etc/php/7.2/cli/php.ini | |
sudo gedit /etc/php/7.2/cli/conf.d/20-xdebug.ini | |
[Xdebug] | |
; путь к файлу so, который мы временно сохаринили на шаге раньше | |
zend_extension=/usr/lib/php/20170718/xdebug.so | |
; остальные обязательные параметры | |
xdebug.profiler_enable_trigger=1 |
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
let login = pm.variables.get("login"); | |
let password = pm.variables.get("password"); | |
pm.sendRequest({ | |
url: pm.variables.get("baseUrl") + '/api/v1/Account/authorization', | |
method: 'POST', | |
header: { | |
"content-type": "application/json" | |
}, | |
body: { |
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
<VirtualHost *:80> | |
ServerName hostname.com | |
ServerAdmin email@gmail.com | |
ServerAlias www.hostname.com | |
DocumentRoot /var/www/hostname.com/public_html | |
<Directory /var/www/hostname.com/public_html> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All |
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
/** | |
* Get value from object by key | |
* @param obj | |
* @param key | |
* @param defaultValue | |
* @returns {*} | |
*/ | |
function getObjectValue(obj, key, defaultValue) { | |
defaultValue = defaultValue || null; |
NewerOlder