Skip to content

Instantly share code, notes, and snippets.

@onema
onema / gist:6060077
Last active December 20, 2015 02:59 — forked from makasim/gist:3720535
Form PatchSubsciber for Symfony 2.3. This Form Event Subscriber will help prepare data for a PATCH request. It can be added in your CustomFormType::buildForm method.
<?php
namespace Acme\DemoBundle\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
/**
* Changes Form->submit() behavior so that it treats not set values as if they
@kovagoz
kovagoz / post-checkout
Created August 25, 2014 09:14
Composer install on git checkout
#!/bin/bash
old_head="$1"
new_head="$2"
branch_switch="$3"
git_root=$(git rev-parse --show-toplevel)
git diff --name-only $new_head $old_head | grep composer.lock > /dev/null
<?php
namespace Acme\DemoBundle\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
/**
* Changes Form->submit() behavior so that it treats not set values as if they
@axilleas
axilleas / appearances_helper.rb
Last active June 29, 2016 18:29
GitLab helper for custom login page
# Find this file in app/helpers/appearances_helper.rb
# Discussion at http://axilleas.me/en/blog/2014/custom-gitlab-login-page/
module AppearancesHelper
def brand_item
true
end
def brand_title
'My Organization'
end
@rbrisita
rbrisita / install_angular.sh
Created April 22, 2019 23:06
Install Angular into a new Laravel project using Laravel Mix.
#!/usr/bin/env bash
#
# Author: Robert Brisita <[first-initial][last name] at gmail dot com>
#
# An Angular installation script for a Laravel project.
# This should be run on a new Laravel project install.
#
# Tested on Mac OS X 10.13.6
#