This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
<snippet> | |
<content><![CDATA[ | |
echo '<pre>'; | |
var_dump(${1:this}); | |
echo '</pre>'; | |
exit; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>debug</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
<snippet> | |
<content><![CDATA[ | |
echo '<pre>'; | |
var_dump(${1:this}); | |
echo '</pre>'; | |
exit; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>debug</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
This uses Twitter Bootstrap classes for CodeIgniter pagination.
Drop this file into application/config
.
<?php | |
use Phake as p; | |
class MockingMailTest extends \TestCase | |
{ | |
function test_it_should_send_mail() | |
{ | |
// Mocking Laravel Mail | |
$mockedMail = p::mock('Illuminate\Mail\Mailer'); | |
$this->app->instance('mailer', $mockedMail); |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |
public function ceksmtp() | |
{ | |
$fp = fsockopen("www.google.com", 80, $errno, $errstr, 10); // work fine | |
if (!$fp) | |
echo "www.google.com - $errstr ($errno)<br>\n"; | |
else | |
echo "www.google.com - ok<br>\n"; | |
$fp = fsockopen("smtp.gmail.com", 465, $errno, $errstr, 10); // NOT work |
This assumes you are now connected to the server via SSH.
sudo -s
Enter root mode for admin accessgroupadd devgroup
Create new group to be later granted access to /var/www/htmluseradd -G root,devgroup masterdev
Create new root user. Also add to the devgrouppasswd masterdev
Change password for the new root user<?php | |
/** | |
* Class Buku | |
* @author Acep Saepudin | |
*/ | |
class Buku | |
{ | |
private $penulis = 'Acep Saepudin'; |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
CREATE TABLE `makers` ( | |
`id` int(10) unsigned NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`description` varchar(255) NOT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- |