Skip to content

Instantly share code, notes, and snippets.

View GabrielCW's full-sized avatar

Gabriel Theron GabrielCW

  • www.class-web.fr
View GitHub Profile
@skinofstars
skinofstars / application_routes.js
Created December 11, 2014 15:39
Ember rollback unsaved changes on navigation
// Extend from this for a user to get a notification for unsaved model changes
// and rollback the model if they choose to navigate away.
Ember.DSModelRoute = Ember.Route.extend({
deactivate: function() {
var model = this.get('controller.model');
model.rollback();
if (model.get('isNew')) {
model.deleteRecord();
}
},
@dehuszar
dehuszar / .htaccess
Created November 13, 2014 19:55
.htaccess for Ember-CLI builds
# place in [app]/public so it gets compiled into the dist folder
Options FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@jakzal
jakzal / AuthenticationContext.php
Last active May 2, 2022 10:18
Logging user into a Symfony app in Behat
<?php
namespace Acme\Context;
use Acme\MyApp\User;
use Behat\MinkExtension\Context\RawMinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Doctrine\ORM\EntityManager;
use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken;
use Symfony\Component\HttpKernel\KernelInterface;
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.