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
@remy
remy / gist:259520
Created December 18, 2009 14:39
onorientationchange
// jQuery based patch for onorientationchange
(function () {
var w = window.innerWidth, h = window.innerHeight, el = $('body')[0];
if (!('onorientationchange' in el)) {
if (el.setAttribute) {
el.setAttribute('onorientationchange', 'return;');
if (!typeof element[eventName] == 'function') {
// patch support for the onorientationchange event via onresize
$(window).resize(function () {
@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);
}
});
};
@MrOrz
MrOrz / README.md
Last active July 22, 2018 15:36
Cross-device BrowserSync with webpack demo
@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

@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;
@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 !

@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:

@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
@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)
@rbartholomew
rbartholomew / Netflix.js
Created November 16, 2011 01:05
Netflix Windows 8
(function () {
'use strict';
var clientKey = "XXXXXXXXXXXXXX";
var clientSecret = "XXXXXXXXXXXX";
var oauthToken;
var oauthSecret;
var userId;
var loginUrl;
var applicationName;