Skip to content

Instantly share code, notes, and snippets.

View tamert's full-sized avatar
:octocat:
Edit status

Tamer Ağaoğlu tamert

:octocat:
Edit status
View GitHub Profile
@tamert
tamert / dBug
Created August 25, 2012 09:45
dBug for Yii Framework Extensions
* YII USAGE
* =============
* $this->widget('ext.dBug.dBug', array("item"=> variable [,forceType] ));
* $this->widget('ext.dBug.dBug', array("item"=> $myVariable ));
Outputs colored and structured tabular variable information.
Variable types supported are: Arrays, Classes/Objects, Database and XML Resources.
Ability to force certain types of output. Example: You can force an object variable to be outputted as an array type variable.
Stylesheet can be easily edited.
Table cells can be expanded and collapsed
/**
* jQuery Stepbystep plugin
* http://www.tinysay.com/
*
* Copyright 2012, Tamer Agaoglu
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Date: Tuesday 27 Nov 2012
*/
/**
* jQuery Stepbystep plugin
* http://www.tinysay.com/
*
* Copyright 2012, Tamer Agaoglu
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Date: Tuesday 27 Nov 2012
*/
### Keybase proof
I hereby claim:
* I am tamert on github.
* I am tagaoglu (https://keybase.io/tagaoglu) on keybase.
* I have a public key ASApBvVMdkjzlHuMef-LphvWryn3oJRgiY8npVkX4xIz0Qo
To claim this, I am signing this object:
@tamert
tamert / main.rb
Created October 5, 2019 22:58
* and ** operator
# * operator
def order_pizza(*pizzas)
return pizzas
end
puts order_pizza('Bora', 'Tolga', 'Sevil')
# * operator - into Object
def frameworks(*lovers)
return lovers
end
# * operator
def order_pizza(*pizzas):
for i in range(len(pizzas)):
print(i, pizzas[i])
order_pizza('Bora', 'Tolga', 'Sevil')
# * operator
def frameworks(*lovers):
for i in range(len(lovers)):
@tamert
tamert / katilim_1.py
Created August 25, 2020 21:30
python katılım
class Content:
def __init__(self, title, body):
self.title = title
self.body = body
def show(self):
return "baslik: %s icerik: %s" % (self.title, self.body)
news = Content("datca", "gercekten guzel bir sehir")
print(news.show())
@tamert
tamert / katilim_2.py
Created August 25, 2020 21:45
katılım
class Content:
def __init__(self, title, body):
self.title = title
self.body = body
def show(self):
return "baslik: %s icerik: %s" % (self.title, self.body)
class Page(Content):
def __init__(self, title, body, date):
super().__init__(title, body)
@tamert
tamert / News.php
Last active August 29, 2020 20:49
News.php
<?php
// src/Entity/News.php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource
@tamert
tamert / NewsExtension.php
Last active August 29, 2020 21:16
NewsExtension.php
<?php
namespace App\DoctrineExtension;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use App\Entity\News;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Security\Core\Security;