Skip to content

Instantly share code, notes, and snippets.

View drola's full-sized avatar

Matjaž Drolc drola

View GitHub Profile
@nielsmouthaan
nielsmouthaan / MenuBuilder.php
Created September 22, 2012 10:21
Custom KnpMenuBundle navigation bar twig template to support Font Awesome icons & Twitter bootstrap lay-out
<?php
namespace Acme\HelloBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@studioijeoma
studioijeoma / WebGL_Canvas_Texture_Text_Example.html
Created September 1, 2011 18:47
Three.js WebGL Canvas Texture Text Example
<!doctype html>
<html>
<head>
<title>Three.js : WebGL Canvas Texture Text Example</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
@igorw
igorw / index.php
Created April 21, 2011 00:05
Silex app with global Twig layout
<?php
require __DIR__.'/silex.phar';
$app = new Silex\Application();
$app->register(new Silex\Extension\TwigExtension(), array(
'twig.path' => __DIR__.'/views',
'twig.class_path' => __DIR__.'/vendor/twig/lib',
));