Skip to content

Instantly share code, notes, and snippets.

View DrMabuse23's full-sized avatar
🏠
Working from home

Pascal Brewing DrMabuse23

🏠
Working from home
View GitHub Profile
public function actionGetModel()
{
$model = new ContactForm();
$captcha = new Captcha();
$captcha->model = $model;
$captcha->attribute = 'verifyCode';
$cview = $captcha->getView();
$response = new Response();
$response->format = Response::FORMAT_JSON;
// $response->data['message'] = "ContactForm";
var ngTranscludeDirective = ngDirective({
restrict: 'EAC',
link: function($scope, $element, $attrs, controller, $transclude) {
if (!$transclude) {
throw minErr('ngTransclude')('orphan',
'Illegal use of ngTransclude directive in the template! ' +
'No parent directive that requires a transclusion found. ' +
'Element: {0}',
startingTag($element));
}
@DrMabuse23
DrMabuse23 / index.html
Created September 21, 2014 09:32
material icon ?
<material-button class="material-button-fab">
<svg class="material-icon" viewBox="0 0 32 32">
<g filter="">
<use xlink:href="#sprout"></use>
</g>
</svg>
</material-button>
@DrMabuse23
DrMabuse23 / SassMeister-input-HTML.html
Created September 15, 2014 22:20
Generated by SassMeister.com.
<div class="container">
<section class="first-section">
<img src="http://placekitten.com/g/200/200" >
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit</p>
</section>
<section class="second-section">
<img src="http://placekitten.com/g/200/200" >
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit</p>
</section>
// Grids
// -------------------------------
$grid-padding-width: 10px !default;
$grid-responsive-sm-break: 567px !default; // smaller than landscape phone
$grid-responsive-md-break: 767px !default; // smaller than portrait tablet
$grid-responsive-lg-break: 1023px !default; // smaller than landscape tablet
$list:();
$classList:();
@DrMabuse23
DrMabuse23 / _form_magazine.php
Last active August 29, 2015 14:05
my trys to use the resatpai with activeform
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model \common\models\base\MagazineBase */
/* @var $form ActiveForm */
?>
<div class="form_magazine">
@DrMabuse23
DrMabuse23 / LoginForm.php
Created August 28, 2014 16:44
ip2long problem
/**
* Logs in a user using the provided username and password.
*
* @return boolean whether the user is logged in successfully
*/
public function login()
{
if ($this->validate()) {
$this->user->setAttribute('logged_in_from', ip2long(\Yii::$app->getRequest()->getUserIP()));
describe('starrag main start', function() {
it('should have clicked a application', function() {
browser.get('http://localhost/p4-starrag/app-starrag/app/#/main');
scope.$on('db-server-replicate-done',function(){
element(by.css('.grid-item')).click();
});
});
});
GET http://5.101.100.205/ [HTTP/1.1 304 Not Modified 28ms]
GET http://5.101.100.205/game/primus.js [HTTP/1.1 200 OK 55ms]
GET http://5.101.100.205/static/js/client.js [HTTP/1.1 304 Not Modified 27ms]
GET http://5.101.100.205/game/ [HTTP/1.1 200 OK 38ms]
GET http://5.101.100.205/game/ [HTTP/1.1 101 Switching Protocols 52ms]
GET http://5.101.100.205/game/ [HTTP/1.1 200 OK 37ms]
GET http://5.101.100.205/game/ [HTTP/1.1 200 OK 29ms]
"Phaser v2.0.5 - Renderer: Canvas - Audio: WebAudio - http://phaser.io" client.js:19912
GET http://5.101.100.205/static/assets/images/tilesets/dungeon.png [HTTP/1.1 304 Not Modified 26ms]
GET http://5.101.100.205/game/ [HTTP/1.1 200 OK 29ms]
<?= $form->field($model, 'category_id')->widget(\kartik\widgets\Select2::classname(), [
'options' => ['placeholder' => Yii::t('app','Choose')],
'data' => \yii\helpers\ArrayHelper::map(\common\models\Category::find()->all(),'id','title')
]);?>