Skip to content

Instantly share code, notes, and snippets.

@fadib
fadib / yii.php
Last active July 11, 2018 13:18
Yii 1 -> Yii 2
<?php
CHtml::cssFile() => Html::cssFile()
CHtml::scriptFile() => Html::jsFile()
CHtml::link() => Html::a()
CHtml::image() => Html::img()
CHtml::submitButton() => Html::submitButton()
// View
$this->renderPartial() => $this->render()
@fadib
fadib / uri.js
Created August 24, 2014 13:44 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@fadib
fadib / gist:11250941
Last active August 29, 2015 14:00
A8C
jQuery(".the-bios > div").length