Skip to content

Instantly share code, notes, and snippets.

View mchambaud's full-sized avatar
🚲
Meet, commit, ride.

Michael Chambaud mchambaud

🚲
Meet, commit, ride.
  • Montreal, Canada
View GitHub Profile
@mentos1386
mentos1386 / Webstorm-Airbnb-Javascript-codeStyle.xml
Created March 12, 2017 11:03
Airbnb inspired Webstorm Javascript CodeStyle
<code_scheme name="Airbnb">
<option name="RIGHT_MARGIN" value="100" />
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
<option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
@toddmotto
toddmotto / *.md
Last active April 25, 2023 09:06
Component versus Directive in AngularJS

Component versus Directive in AngularJS

.component()

Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture
@MrOrz
MrOrz / README.md
Last active July 22, 2018 15:36
Cross-device BrowserSync with webpack demo
@idosela
idosela / http-response-interceptor.js
Last active February 25, 2024 12:51
Sample code for ng-conf 2014
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
$httpProvider.responseInterceptors.push([
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
@LinusU
LinusU / README.md
Last active July 17, 2021 08:06 — forked from apla/icons_and_splash.js
Icons and Splash images for your Cordova project. (with iOS 7 support)

Usage

Install cordova into node_modules

npm install cordova

Add icons_and_splash.js

@EpokK
EpokK / ngFocus.js
Created July 20, 2013 10:48
ngFocus
myApp.directive('ngFocus', function( $timeout ) {
return function( scope, elem, attrs ) {
scope.$watch(attrs.ngFocus, function( newval ) {
if ( newval ) {
$timeout(function() {
elem[0].focus();
}, 0, false);
}
});
};
@0x-r4bbit
0x-r4bbit / proposal.md
Last active May 2, 2022 03:50
Proposals on how to structure 'standalone' modules in angular. Please read it and leave your opinions for a better angularjs world!

Angular module structure (proposal)

Everyone who's reading this, please leave your opinion/ideas/proposals as a comment for a better world!

Background

Most of you guys read Josh' proposals to make components more reusable, I think. Now, reading through this proposals definitely gives a feeling that this is the right way. Anyways, If you haven't read it yet, you should.

So Josh shows us, how angular apps can be structured in a better and more reusable way. Reusability is a very important thing when it comes to software development. Actually the whole angularjs library follows a philosophy of reusability. Which is why you able to make things like:

@revolunet
revolunet / angularjs.md
Last active October 22, 2021 00:36
BeerJS + AngularJS Paris le 25/2

AngularJS best ressources

Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)

Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !

@joshkurz
joshkurz / app.js
Created August 9, 2012 03:21
AngularJs-twitterBootstrap-wysiHtml5
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) {
$locationProvider.hashPrefix('');
});
function MainCtrl($scope, Serv) {
$scope.selectedItem = {
value: 0,
label: ''
};
$scope.Wrapper = Serv;
@chrisortman
chrisortman / ImportedFilePathResolver.cs
Created March 8, 2012 19:48
ASP.NET Optimization Minifiers
public class ImportedFilePathResolver : IPathResolver
{
private string currentFileDirectory;
private string currentFilePath;
/// <summary>
/// Initializes a new instance of the <see cref="ImportedFilePathResolver"/> class.
/// </summary>
/// <param name="currentFilePath">The path to the currently processed file.</param>
public ImportedFilePathResolver(string currentFilePath)