Skip to content

Instantly share code, notes, and snippets.

{
"files.autoSave": "onFocusChange",
"editor.quickSuggestions": {
"comments": true
},
"files.associations": {},
"zenMode.hideLineNumbers": false,
"php.debug.executablePath": "",
"window.zoomLevel": 2,
"update.mode": "none",
alias ls='ls -G'
source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
export GIT_PS1_SHOWCOLORHINTS=true
export GIT_PS1_SHOWDIRTYSTATE=true
PS1='\h \W$(__git_ps1 " (%s)")\$ '
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
set nocompatible " Don't emulate old vi
set autoindent " Indent at the same level of the previous line
set sm " Show matching brackets/parenthesis
set ruler " Show the ruler
set nu " Show line numbers
" Syntax highlighting
if !exists("syntax on")
syntax on
endif
#!/bin/bash
# Scroll direction: natural
defaults write 'Apple Global Domain' com.apple.swipescrolldirection -bool FALSE
# Set the timezone
sudo systemsetup -settimezone "Europe/Paris" > /dev/null
# Require password immediately after sleep or screen saver begins
#defaults write com.apple.screensaver askForPasswordDelay -int 0
@b-durand
b-durand / placeholder.js
Last active December 15, 2015 14:09 — forked from aaronmccall/placeholder.js
Emulate placeholder HTML5 with JavaScript (for IE less than 10)
setup_placeholders = (function() {
$.support.placeholder = false;
test = document.createElement('input');
if ('placeholder' in test) {
$.support.placeholder = true;
return function() {}
} else {
return function() {
$(function() {
@b-durand
b-durand / MockDbAdapter.php
Created August 20, 2012 21:58
PHPUnit Mock API with Zend\Db
<?php
$date = new DateTime();
$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\Pdo\Statement');
$mockStatement->expects($this->once())->method('execute')->with($this->equalTo(array(
'timestamp' => $date->format(FormatterInterface::DEFAULT_DATETIME_FORMAT)
)));
$mockDbDriver = $this->getMockBuilder('Zend\Db\Adapter\Driver\Pdo\Pdo')
->disableOriginalConstructor()
class ControlSpacesFixerTest extends \PHPUnit_Framework_TestCase
{
/* ... */
/**
* @dataProvider testFixCallsProvider
*/
public function testFixCalls($call, $callFixed)
{
$fixer = new Fixer();
@b-durand
b-durand / .gitconfig
Created August 7, 2012 17:56
Git config
[user]
name = John Doe
email = j.doe@github.com
[color]
diff = auto
status = auto
branch = auto
interactive = auto
[alias]
slog = log --pretty=format:'%Creset%C(red bold)[%ad] %C(blue bold)%h %Creset%C(magenta bold)%d %Creset%s %C(green bold)(%an)%Creset' --abbrev-commit --date=short
@b-durand
b-durand / sample1.txt
Created July 5, 2012 19:48 — forked from anonymous/sample1.txt
email log sample code
application.ini
resources.log.stream.writerName = "Mail"
resources.log.stream.writerParams.subjectPrependText = "website ERROR: "
resources.log.stream.writerParams.email = "info@example.com"
resources.log.stream.writerParams.replyto = "info@example.com"
resources.log.stream.writerParams.to = "me@example.com"
ErrorController.php
// Log exception, if logger available
if ($log = $this->getLog()) {