sudo apt-get install python3-pip
sudo pip3 install virtualenv
var enterInput = document.getElementsByTagName("input")[0]; | |
function getCurrent(){ | |
var current = null; | |
for (i = 0; i < 99; i ++) { | |
current = document.getElementById("nhwMiddlegwt-uid-" + i); | |
if (current != null) break; | |
} | |
return current; | |
} | |
function setCurrent(){ |
#Setup mailer in Yii2: | |
'mail' => [ | |
'class' => 'yii\swiftmailer\Mailer', | |
'viewPath' => '@backend/mail', | |
'useFileTransport' => false, | |
'transport' => [ | |
'class' => 'Swift_SmtpTransport', | |
'host' => 'smtp.gmail.com', | |
'username' => '[email protected]', | |
'password' => 'password', |
.jq-stars { | |
display: inline-block; | |
} | |
.jq-rating-label { | |
font-size: 22px; | |
display: inline-block; | |
position: relative; | |
vertical-align: top; | |
font-family: helvetica, arial, verdana; |
<?php | |
// You may need to use this classes | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Pagination\Paginator; | |
// Searching in segments Model, with pagination, ordering, sorting and searching. | |
$segments = Segment::where('segmentProviderName', $provider); // first where condition | |
$segmentStatuses = config('constants.segment.status'); |
# | |
# Check version php and pecl | |
# | |
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php | |
pecl version | |
# | |
# Install mcrypt extension | |
# see http://pecl.php.net/package-info.php?package=mcrypt&version=1.0.1 | |
# |
<?php | |
define('WP_USE_THEMES', true); | |
require_once(dirname(__FILE__) . '/wp-load.php'); | |
global $wpdb; | |
global $wp_version; | |
$requirements = [ | |
[ | |
'min' => '3.2', | |
'max' => '10', |
#!/usr/bin/env bash | |
##### | |
# Script to install postfix | |
##### | |
DOMAIN="example.com" | |
EMAIL="[email protected]" | |
PASSWORD="example.com1*" |
#! /bin/sh | |
# postfix and dovecot setup script (instead of sendmail) | |
# based on http://centossrv.com/postfix.shtml | |
echo "### install postfix via yum if not exist" | |
if [ ! -e /etc/postfix/main.cf ] | |
then | |
sudo yum -y install postfix | |
else |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Contracts\Foundation\Application; | |
use Illuminate\Routing\Route; | |
use Symfony\Component\HttpKernel\Exception\HttpException; | |
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken; | |
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Original; |