Skip to content

Instantly share code, notes, and snippets.

View cebe's full-sized avatar
☁️
working on cebe.cloud

Carsten Brandt cebe

☁️
working on cebe.cloud
View GitHub Profile
@cebe
cebe / Mongodb Cache.php
Last active September 27, 2018 10:35 — forked from Abiraman/Mongodb Cache
// My code
<?php
$collection=\app\models\Notifications::getCollection()->name;
if ($this->beginCache('Notifghjgjhgication', ['dependency' => [
'class' => 'yii\caching\DbQueryDependency',
'query' => \app\models\Notifications::find()->where(["receiver_type" => "vendor", "receiver_id" => \Yii::$app->user->identity->_id, 'read_status' => FALSE]),
'method' => 'count',
]])) {?>
<li class="dropdown" id="Notification-list-container">
<?= Yii::$app->runAction('/notification/default/notificationlist') ?>
@cebe
cebe / abc.sls
Last active November 22, 2017 06:55 — forked from tom--/abc.sls
a:
lorem.ipsum
x:
lorem.dolor
y:
lorem.sit
b:
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'id',
'location',
'date',
array(
'label'=>'attendees',
'value'=>$model->attendees!=null ? null : $model->attendees->username,
),
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'id',
'location',
'date',
array(
'label'=>'attendees',
array(
'attendees'=>$model->attendees!=null ? ' ' : $model->attendees->username),
@cebe
cebe / about.md
Created March 15, 2012 10:40 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@cebe
cebe / Article.md
Created August 17, 2011 11:01 — forked from geelen/Article.md

Idiot-Proof Git Aliases