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 Tests\Feature; | |
use Tests\TestCase; | |
class RoutesTest extends TestCase | |
{ | |
const PHP_VERSION = '7.4.22'; | |
const MAX_TIME_DURATION_SECONDS = 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
enum Environment: String { | |
case production = "production" | |
case development = "development" | |
} | |
func env() -> Environment { | |
// TestFLight, Xcode | |
if Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" { | |
return .development | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Test</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> | |
<script src="https://www.google.com/recaptcha/api.js" async defer></script> | |
</head> | |
<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
#!/bin/sh | |
# Grant privileges | |
# echo "YOUR_USER ALL=NOPASSWD: /usr/sbin/service php7.4-fpm reload" | sudo tee -a /etc/sudoers.d/php-fpm > /dev/null | |
# echo "YOUR_USER ALL=NOPASSWD: /usr/sbin/service nginx restart" | sudo tee -a /etc/sudoers.d/php-fpm > /dev/null | |
# echo "YOUR_USER ALL=NOPASSWD: /usr/sbin/service supervisor restart" | sudo tee -a /etc/sudoers.d/php-fpm > /dev/null | |
NAME=$(date +"%m-%d-%Y-%H-%M-%S") | |
FOLDER=releases/$NAME | |
BACKUP=backup/before_$NAME.sql |
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
/** | |
* Sync morphToMany | |
* | |
* @param morphToMany $morphToMany | |
* @param array $ids | |
* @return array | |
*/ | |
public static function syncMorphToMany($morphToMany, $ids) | |
{ | |
$changes = [ |
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
#scp ~/.ssh/id_rsa.pub [email protected]:~ | |
# [ -d ~/.ssh ] || (mkdir ~/.ssh; chmod 711 ~/.ssh) | |
# cat ~/id_rsa.pub >> ~/.ssh/authorized_keys | |
# chmod 600 ~/.ssh/authorized_keys | |
# rm ~/id_rsa.pub | |
apt install -y software-properties-common | |
add-apt-repository ppa:ondrej/php | |
# add-apt-repository universe |
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
<? | |
global $wpdb; | |
define('MY_OLD_DOMAIN', 'http://olddomain.ru'); | |
define('MY_NEW_DOMAIN', 'http://newdomain.ru'); | |
function myWalkCallback(&$item, $key) | |
{ | |
$item = str_replace(MY_OLD_DOMAIN, MY_NEW_DOMAIN, $item); | |
} |
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
.bootstrap-grid { | |
position: fixed; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
z-index: 9999; | |
width: 100%; | |
height: 100%; | |
} |
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
1. sudo chown -R $(whoami) /usr/local | |
2. brew update | |
3. sudo chmod 0755 /usr/local | |
4. sudo chown root:wheel /usr/local | |
5. brew upgrade |
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
hg revert --all -r-1 |
NewerOlder