Skip to content

Instantly share code, notes, and snippets.

View hason's full-sized avatar
🙂

Martin Hasoň hason

🙂
View GitHub Profile
@nicpottier
nicpottier / README
Created April 16, 2010 18:16
Basic Django template syntax highlighting support for the codemirror editor.
These two files provide limited syntax highlighting using the most
excellent codemirror syntax highlighter.
See:
http://marijn.haverbeke.nl/codemirror/
Stick the .js and .css files in the appropriate spots for your
codemirror installation.
You can enable it on a textarea using something like:
@nicpottier
nicpottier / PageEditor.py
Created July 29, 2010 08:05
Restructured Text, Pygments, CodeMirror and Moin Moin, all playing together.
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - PageEditor class
PageEditor is used for r/w access to a wiki page (edit, rename, delete operations).
TODO:
* See comments in Page.py, most apply here, too.
* The editor code should be modularized so we will be able to use it for any
text/* mimetype data with some special features enabled depending on the
@jbrumwell
jbrumwell / oo.php
Created September 23, 2010 18:56 — forked from dhotson/oo.php
<?php
// Define the 'class' class
$class = Obj()
->fn('new', function ($class) {
$newClass = Obj($class->methods)
->fn('new', function($class) {
$obj = Obj($class->imethods);
$args = func_get_args();
array_shift($args);
@ornicar
ornicar / config.yml
Created October 29, 2010 12:40
DoctrineUserBundle YAML config
doctrine_user.config:
db_driver: odm
class:
model:
user: Bundle\ExerciseUserBundle\Document\User
group: ~
permission: ~
form:
user: ~
group: ~
@weaverryan
weaverryan / view.rst
Created January 3, 2011 14:34
WIP Symfony2 View Documentation with notes

The View

For each request in Symfony2, the goal of the developer is always the same: to construct and return a Response object that represents the resource being requested. This is most obvious inside a controller, which almost always returns a Response object:

@beberlei
beberlei / SQLFilter.php
Created July 21, 2011 10:46
First idea for SQL Filtering in Doctrine2
<?php
namespace Doctrine\ORM\Query\Filter;
abstract class SQLFilter
{
final public function __construct(Connection $conn);
final function setParameter($name, $value, $type);
@havvg
havvg / bdd-experiment-guide.md
Created September 9, 2011 14:44
Behavior Driven Development in Symfony2 with Behat, Mink and Zombie.js
@fprochazka
fprochazka / play.js
Created January 24, 2012 17:28 — forked from juzna/01-choose.png
GitHub Play
(function() {
var commits = [], repo = document.location.href.match(/github\.com\/([^\/]+\/[^\/]+)\//)[1];
// Play for all commits
$('.commit-group .commit-links')
.append($('<a href="#" class="browse-button github-play-select">Play</a>'));
// show next commit
var nextCommit = function () {
$('.site .container').load(commits.shift() + ' #.site .container', function () {
@Seldaek
Seldaek / composer.json
Created February 17, 2012 16:22
standard-distro temp
{
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.2",
"symfony/symfony": "2.1.0-dev",
"doctrine/orm": "2.2.0",
"doctrine/doctrine-bundle": "master-dev",
"twig/extensions": "master-dev",
@nikic
nikic / accessors.markdown
Created October 13, 2012 11:22
Analysis of getter/setter usage in Symfony and Zend Framework

In order to get a bit of "hard data" on what accessors will actually be used for once they are introduced I wrote a small script that scans through a codebase, finds all getter and setter methods and checks them for various characteristics. (The analyze.php file in this Gist.)

Here are the results of running it on a Symfony (Standard) skeleton.

absoluteTotal        => 18516 (486.6%)
total                =>  3805 (100.0%)
skipped              =>   124 (  3.3%)