sudo swapon -s
free -m
df -h
sudo fallocate -l 4G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
<?php | |
// /application/bootstrap/app.php | |
Route::register('/ccm/request_test', function() { | |
header("Pragma: no-cache"); | |
echo '<dl>'; | |
?><dt>Application environment:</dt><dd><?php echo ($this->app->environment()) ? $this->app->environment() : 'default'; ?></dd><?php | |
$request = \Concrete\Core\Http\Request::getInstance(); | |
?><dt>Client IP:</dt><dd><?php echo $request->getClientIp(); ?></dd><?php | |
?><dt>Host:</dt><dd><?php echo $request->getHost(); ?></dd><?php | |
?><dt>Port:</dt><dd><?php echo $request->getPort(); ?></dd><?php |
<?php | |
namespace Application\Concrete\Console\Command; | |
use Concrete\Core\Console\Command; | |
use Concrete\Core\Error\UserMessageException; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class MyCommand extends Command |
[This article is for beginners only.]
Now a days laravel valet is so popular to web developers for it's simplicity and easy to use. If you don't know about valet please take a look on valet documentation.
Now valet has environment support for concrete5. You just need to add config files with prefix valet
. For example- you work in a team and your project hasa database configuration file in application/config/database.php
. But different users has different database name, username, password in your team. So, you can make a file in application/config/valet.database.php
and add this path on .gitignore
file. Concrete5 is that smart to get this value automatically.
For faster development, you may have to use concrete5 command line interface frequently. If you don't know about concrete5 command line tool please take a look concrete5 command line interface [documentation](https://do
In this tutorial, you will learn how to send email using Amazon SES with concrete5. We will walk through how to verify that you own the domain or email address, and then send an email using the Amazon SES console.
Amazon Simple Email Service (SES) is a cost-effective email service built on the reliable and scalable infrastructure that Amazon.com developed to serve its own customer base. With Amazon SES, you can send transactional email, marketing messages, or any other type of high-quality content to your customers.
<?php | |
// from http://php.net/manual/en/function.filesize.php | |
function formatBytes($bytes, $precision = 2) { | |
$units = array('B', 'KB', 'MB', 'GB', 'TB'); | |
$bytes = max($bytes, 0); | |
$pow = floor(($bytes ? log($bytes) : 0) / log(1024)); | |
$pow = min($pow, count($units) - 1); | |