Skip to content

Instantly share code, notes, and snippets.

@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

/*
* 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 / 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 }
]
...
...
@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 / config.json
Created September 11, 2015 14:20 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@jonesmac
jonesmac / Memcache-osx.markdown
Last active June 30, 2017 19:49
Setting Up MemCache on OSX with MAMP 2.0
@jonesmac
jonesmac / CSS: Tabs Basic CSS
Created March 2, 2013 19:40
Basic CSS for tabs through Jquerytools
/* root element for tabs */
ul.tabs {
list-style:none;
border-bottom:1px solid #666;
height:30px;
}
/* single tab */
ul.tabs li {
@jonesmac
jonesmac / JS: Tabs Basic Script
Created March 2, 2013 19:33
Basic Script Call for Jquery Tools Tabs
$(function() {
// setup ul.tabs to work as tabs for each div directly under div.panes
$("ul.tabs").tabs("div.panes > div");
});
@jonesmac
jonesmac / HTML: Tabs Basic HTML
Created March 2, 2013 19:33
Basic HTML Structure for Jquerytools tabs
<!-- the tabs -->
<ul class="tabs">
<li><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<div>First tab content. Tab contents are called "panes"</div>
@jonesmac
jonesmac / gist:4747173
Last active December 12, 2015 08:49
CSS: Single Page Site Waypoint CSS
.sticky nav {
position:fixed;
top:0;
left:0;
width:100%;
z-index: 999;
}
.sticky nav ul {
margin:0 auto;