Skip to content

Instantly share code, notes, and snippets.

// Homepage Fake Candidates Profiles
Drupal.behaviors.FakeCandidatesProfiles = {
attach: function (context, settings) {
var max = 3;
var offset = 3;
var developers = $('.view-display-id-developers_header .views-row').clone();
var SLIDER_TIME = 4000;
var ANIMATION_TIME = 1000;
$('.view-display-id-developers_header .views-row').remove();
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use BotMan\BotMan\BotManFactory;
use BotMan\BotMan\Drivers\DriverManager;
use App\Contracts\Developers\DevelopersServiceContract;
use Symfony\Component\HttpFoundation\Response;
use BotMan\Drivers\Slack\SlackDriver;
@diaspar
diaspar / gist:4b6caff8f684f3ee8671
Last active August 29, 2015 14:07
Symfony2 - Multi tenant application

I have this complex problem to solve.

We have a symfony2 project with a typical src/name/bundleName with all the code. We have controllers, entities, domain, forms and resources as views and css/js code. We are using Doctrine to access the storage. This project works only for the USA branch of the company. (A)

Our client now is asking to use the same project, for its business in Europe (B). After some analysis, These are the requirements we have discovered:

  • One codebase and One repo.
  • The data, even users, is not shared between the A and B. There is no middle instance that can see both sets of data.
  • We are using mysql and ONE database for now. No postgre schemas or multiple independent databases.
  • To avoid code duplication, we have to use the same codebase.

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.