Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:
| /// <reference path="angular.d.ts" /> | |
| /// <reference path="angular-route.d.ts" /> | |
| 'use strict'; | |
| // Create and register modules | |
| var modules = ['app.controllers','app.directives', 'app.filters', 'app.services']; | |
| modules.forEach((module) => angular.module(module, [])); | |
| // *** Push ngRoute or $routeProvider won't work *** |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| var isItScrollableWithoutVisibleScrollbars = function(el) { | |
| if (el === null) { | |
| return false; | |
| } | |
| var isScrollable = false; | |
| var hasScrollbars = false; | |
| // first, lets find out if it has scrollable content | |
| isScrollable = el.scrollHeight > el.offsetHeight ? true : false; | |
| // if it's scrollable, let's see if it likely has scrollbars | |
| if (isScrollable) { |
| function keepTrying(otherArgs, promise) { | |
| promise = promise||new Promise(); | |
| // try doing the important thing | |
| if(success) { | |
| promise.resolve(result); | |
| } else { | |
| setTimeout(function() { | |
| keepTrying(otherArgs, promise); |