Skip to content

Instantly share code, notes, and snippets.

View francisbesset's full-sized avatar

Francis Besset francisbesset

View GitHub Profile
@francisbesset
francisbesset / bookmarklet
Last active August 29, 2015 13:57
Office365 Google Chrome Notifier
javascript:(function(){var o365n=document.createElement('script');o365n.setAttribute('src','//gist.githubusercontent.com/francisbesset/9543896/raw/orrifice365notifier.js');document.head.appendChild(o365n);}());
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'
@francisbesset
francisbesset / AcmeDemoType.php
Created January 22, 2014 09:32
Symfony2: Form CheckboxType management with Domain object
<?php
namespace Acme\Bundle\DemoBundle\Form\Type;
use Acme\Bundle\DemoBundle\Domain\DemoDomain;
use Acme\Bundle\DemoBundle\Entity\Demo;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
# Disable Webpage Preview
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
<?php
/**
* Copyright (c) 2007, Roger Veciana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
<?php
namespace App\DemoBundle\Entity;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
class Address
{
/**
* @Soap\ComplexType("int", nillable=true)
@francisbesset
francisbesset / php54.rb
Created March 18, 2012 19:52 — forked from dizda/php.rb
brew install php 5.4
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end