Skip to content

Instantly share code, notes, and snippets.

Avatar

Francis Besset francisbesset

View GitHub Profile
@francisbesset
francisbesset / deploy.sh
Created Feb 2, 2017 — forked from marcw/deploy.sh
Symfony deployment bash script
View deploy.sh
#!/bin/bash
# some configurations values
host="foobar-web00" # the name of the host in my ssh config file
project_path="/var/www/foobar"
user="web"
key_filename="/path/to/.ssh/web-deploy-key"
dry_run="--dry-run"
assets_differ=""
View clean-raspberry.sh
#!/bin/bash
sudo apt-get --yes purge xserver* x11-common x11-utils x11-xkb-utils x11-xserver-utils xarchiver xauth xkb-data console-setup xinit lightdm libx{composite,cb,cursor,damage,dmcp,ext,font,ft,i,inerama,kbfile,klavier,mu,pm,randr,render,res,t,xf86}* lxde* lx{input,menu-data,panel,polkit,randr,session,session-edit,shortcut,task,terminal} obconf openbox gtk* libgtk* alsa* nano python-pygame python-tk python3-tk scratch tsconf wolfram-engine samba-common smbclient cups-bsd cups-client cups-common
sudo apt-get --yes purge aspell hunspell-en-us iptraf libaspell15 libhunspell-1.2-0 lxde lxsession lxtask lxterminal squeak-vm whiptail zenity gdm gnome-themes-standard python-pygame
sudo apt-get --yes purge xdg-tools desktop-file-utils omxplayer python3-numpy python3
sudo apt-get remove xserver-xorg
sudo apt-get purge ^lx
sudo apt-get --yes autoremove
sudo apt-get --yes autoclean
sudo apt-get --yes clean
@francisbesset
francisbesset / AcmeDemoType.php
Created Jan 22, 2014
Symfony2: Form CheckboxType management with Domain object
View AcmeDemoType.php
<?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;
View gist:7293253
# Disable Webpage Preview
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
View WSSoapClient.php
<?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
View Address.php
<?php
namespace App\DemoBundle\Entity;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
class Address
{
/**
* @Soap\ComplexType("int", nillable=true)
@francisbesset
francisbesset / php54.rb
Created Mar 18, 2012 — forked from dizda/php.rb
brew install php 5.4
View php54.rb
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end
@francisbesset
francisbesset / openalarm.yaml
Created Sep 30, 2015 — forked from hugokernel/openalarm.yaml
Fichier de configuration d'un OpenAlarm Node
View openalarm.yaml
devices:
/dev/toto:
config: default
/dev/tty.usbmodemfd131:
config: default
configs:
default:
group: 210
@francisbesset
francisbesset / composer.json
Last active Sep 15, 2015
Setup multi gitiki wiki
View composer.json
{
"require": {
"gitiki/gitiki": ">=1.0-dev",
"gitiki/code-highlight": ">=1.0-dev"
}
}
View lircd-dyson.conf
begin remote
name dyson
bits 8
flags SPACE_ENC|REPEAT_HEADER
eps 30
aeps 100
header 2280 740
one 811 1529