Skip to content

Instantly share code, notes, and snippets.

View Nek-'s full-sized avatar
:octocat:

Maxime Veber Nek-

:octocat:
View GitHub Profile
@Nek-
Nek- / nekland.js
Created August 25, 2013 13:44
Angular resolve http
// Generated by CoffeeScript 1.6.3
(function() {
'use strict';
var NeklandModule, ProjectDetailsController, ProjectsController;
NeklandModule = angular.module('nekland', ['ui.state']);
NeklandModule.config([
'$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {
$locationProvider.html5Mode(true);
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
bundles: []
java: %java_bin%
filters:
cssrewrite: ~
less:
@Nek-
Nek- / Article.php
Created March 4, 2013 00:32
Example of article compatible with NeklandFeedBundle
<?php
namespace Acme\ArticleBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Nekland\Bundle\FeedBundle\Item\ItemInterface;
/**
* Acme\ArticleBundle\Entity\Article
*
@Nek-
Nek- / SelectRedirection.js
Created March 1, 2013 16:08
Make redirection to other pages with a select. Using mootools.
/**
* @author VEBER Maxime (Nek) <[email protected]>
* @company Wandi <www.wandi.fr>
* @requiremetns Mootools
* @compatibility IE7
*
* This script add to select the ability to redirect to another page.
*
*
* Usage:
@Nek-
Nek- / CustomCheckbox.js
Last active December 14, 2015 02:39
Allow you to easily custom your checkboxes with Mootools.
/**
* @author VEBER Maxime (Nek) <[email protected]>
* @company Wandi <www.wandi.fr>
* @requirements Mootools
* @compatibility IE7
*
*
* You can't pimp your checkbox with simple html/css.
* This script is make to allow you to customize easily your checkboxes
*
{% stylesheets '%kernel.root_dir%/Resources/less/site/frontend.less' filter='lessphp' output='css/style.css' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
@Nek-
Nek- / MootoolsPlaceholder.js
Last active December 14, 2015 01:19
Placeholder inputs easily with mootools.
/*
* Mootools Placeholder Class.
*
* @author Nek <[email protected]>
* @company Wandi
*
* Set this data (via store) on elements:
* - "placeholder-text": The text of the placeholder
*
* Use a class to detect if the current text is a placeholder.
@Nek-
Nek- / TruncateFixture.php
Created February 19, 2013 22:59
From #[email protected] How to use fixtures with MySQL and fix Constrains problems
<?php
namespace Otera\SiteBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
<service id="soloist.core.listener.blog" class="%soloist.core.listener.blog.class%">
<argument type="service" id="doctrine.orm.entity_manager" />
<tag name="kernel.event_listener" event="soloist_blog.request_categories" method="onRequestCategories" />
</service>
@Nek-
Nek- / similar_search.sql
Created July 13, 2012 14:31
Search for similar elements
---- Récupération de 5 nodes similaires à une node ayant les tags suivants:
-- machin, machin2, machin3
/*
+---------------+ +------------------+ +------------------+
| Node | | Tagging | | Tag |
+---------------+ +------------------+ +------------------+
| id | < - - | resource_id | --------->| id |
| contenu | | ressource_type | / | name |
+---------------+ | tag_id |/ +------------------+
+------------------+