Skip to content

Instantly share code, notes, and snippets.

View dedikisme's full-sized avatar

Dedy Kurniawan dedikisme

View GitHub Profile
var net = require('net');
var server = net.createServer();
server.on('connection', handleConnection);
server.listen(9000, function () {
console.log('server listening to %j', server.address());
});
function handleConnection(conn) {
<?php
namespace console\controllers;
use console\components\YMEngine;
class YmController extends \yii\console\Controller {
public $username = 'xxxx';
public $password = 'xx';
This file has been truncated, but you can view the full file.
The system will restore your files …
backup-1.31.2015_14-59-02_r110789/
backup-1.31.2015_14-59-02_r110789/httpfiles/
backup-1.31.2015_14-59-02_r110789/mysql/
backup-1.31.2015_14-59-02_r110789/mysql/r110789_wp.sql
backup-1.31.2015_14-59-02_r110789/mysql/r110789_shineisp.sql
backup-1.31.2015_14-59-02_r110789/mysql/roundcube.sql
backup-1.31.2015_14-59-02_r110789/mysql/r110789_billing.create
backup-1.31.2015_14-59-02_r110789/mysql/openfileslimit
backup-1.31.2015_14-59-02_r110789/mysql/r110789_wp.create
<?php
$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();
$cs->registerScriptFile($baseUrl.'/themes/canvas/javascripts/jquery-1.7.1.min.js');
$cs->registerScriptFile('http://maps.google.com/maps/api/js?sensor=false');
?>
<div id="contentHeader">
<h1>General Setting</h1>
</div>
<?php
class RegController extends Controller {
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout = '//layouts/column2';
<?php
/**
* This is the model class for table "reg".
*
* The followings are the available columns in table 'reg':
* @property integer $id_reg
* @property string $nama_reg
* @property string $value
*/
<?php
class Alamat extends CFormModel {
public $alamat;
public $telp;
public $latitude;
public $longitude;
/**
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'name[]') ?>
<?= $form->field($model, 'body[]')->textArea(['rows' => 6]) ?>
<?= $form->field($model, 'name[]') ?>
<?php
//class Controller
public function actionContact()
{
$model = new DynamicModel([
'name', 'body'
]);
$model->addRule(['name', 'body'], 'required')
<?php
public function actionContact()
{
$model = new DynamicModel([
'name', 'body'
]);
$model->addRule(['name', 'body'], 'required')
->addRule(['name'],'unique');