Skip to content

Instantly share code, notes, and snippets.

@jonesmac
jonesmac / mobileMenuTouchHelper.js
Created May 16, 2016 14:18
Touch Friendly Drop Down Menu
function mobileMenuTouchHelper () {
$(document).on('page:change', function () {
var topLevelMenuItems = $('.menu__list > a');
menuTouches(topLevelMenuItems);
$(window).on('orientationchange', function () {
unbindTouches(topLevelMenuItems);
menuTouches(topLevelMenuItems);
});
});
}
@jonesmac
jonesmac / app.module.ts
Last active February 8, 2018 15:02 — forked from mrgoos/app.module.ts
Intercepting http request/respons in Angular 2. Works from version 2.3.0.
...
...
providers: [
{ provide: Http, useClass: ExtendedHttpService }
]
...
...
/*
* This plugin makes sure karma doesn't run any specs when there's a
* compilation error in a module by checking the finished compilation for warnings
* which would prevent tests from accurately running.
*
* Inspiration for looking at the warnings length
* https://gist.github.com/Stuk/6b574049435df532e905
*/
import { Compiler } from 'webpack';
@jonesmac
jonesmac / git_rebase_--onto example.md
Created April 21, 2020 21:09
When you have a feature branch that is squashed merged and you need to 'catch up' new feature work that depends on the non-squashed history.

Given I have a setup like so

    A---B---C---D  develop
         \
          E---F---G---H---I  feature/123
                           \
                            J---L---M  feature/124

And feature/123 is squash merged (N) into develop leaving feature/124 with extra commits