Skip to content

Instantly share code, notes, and snippets.

Autres

909C

  • Data Analyst
Data Scientist
  • Database Architect (GraphDB)

Ametix

  • QA manager
  • Analyste d’exploitation/gestionnaire d’incidents
@jeremymarc
jeremymarc / capybara cheat sheet
Last active August 29, 2015 14:25 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@jeremymarc
jeremymarc / backbone.rails.js
Created April 29, 2011 16:18 — forked from trydionel/backbone.rails.js
Makes Backbone.js play nicely with default Rails setup
//
// Backbone.Rails.js
//
// Makes Backbone.js play nicely with the default Rails setup, i.e.,
// no need to set
// ActiveRecord::Base.include_root_in_json = false
// and build all of your models directly from `params` rather than
// `params[:model]`.
//
// Load this file after backbone.js and before your application JS.
@jeremymarc
jeremymarc / hack.sh
Created April 6, 2012 18:25 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jeremymarc
jeremymarc / BaseModelManager.php
Created April 26, 2012 18:00 — forked from tuongaz/BaseModelManager.php
Symfony2 Model Manager
<?php
abstract class BaseModelManager {
protected $em;
protected $class;
protected $repository;
protected $container;
/**
* Constructor.
@jeremymarc
jeremymarc / UseIndexWalker.php
Created May 15, 2012 22:32 — forked from arnaud-lb/UseIndexWalker.php
USE INDEX / FORCE INDEX in a Doctrine2 DQL query
<?php
use Doctrine\ORM\Query\SqlWalker;
/**
* Quick hack to allow adding a USE INDEX on the query
*/
class UseIndexWalker extends SqlWalker
{
const HINT_USE_INDEX = 'UseIndexWalker.UseIndex';
@jeremymarc
jeremymarc / .gitignore
Created May 26, 2012 15:46 — forked from CHH/.gitignore
PHP Templating Engine with bindable $this support in 53 LOC
vendor/
composer.lock
@jeremymarc
jeremymarc / gist:2984168
Created June 24, 2012 17:53
Ajax Checkbox with Emberjs
App.AjaxCheckbox = Ember.Checkbox.extend({
'change': function(e) {
this._super(e);
this.get('parentView').submit();
}
});
@jeremymarc
jeremymarc / gist:3006910
Created June 27, 2012 21:16
Rewrite rule for subdomain with sf2
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$
RewriteCond www/%{REQUEST_FILENAME} !-f
RewriteCond www/%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ app_dev.php/subdomain/ [QSA,L]
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony-x": "2.1.*",
"doctrine/orm": "2.2.*",