Add Table of Contents to Markdown

When you are writing tutorials that are broken up by sections it is nice to have a table of contents at the top to help the users navigate. However, maintaining this by hand is a no go. Luckily there is a great npm package called doctoc that will look at the headings in your markdown file and generated a table of contents for you.

Read More ›

Factory Reset Dell Venue 7 x86 Android Tablet

I rarely use my Dell tablet and when I went to use it again I couldn’t remember the lock pattern. No problem I thought I will just reset it but I had since changed or my router and the tablet wasn’t able to connect to the Internet.

So my only option was to figure out to do a factory reset of the device. This device does not have a reset button on it. So off to Google I went.

So long story short. After much searching I figured it out.

Read More ›

Jekyll Part 14: How To Validate Links and Images

Welcome the continuing series on using Jekyll. In this tutorial we are going to go through how you can validate your link and image references.

As your blog grows and you get more posts, it becomes harder to validate images and links are still valid on older post. On new post it is pretty easy since you only have one last to look for. However, this is a process that can be fully automated so got don’t even have to worry about it anymore.

Read More ›

Calling Filters in Your Angular Controller

Here is a quick tip for how to call a filter from within your Angular controller. This example assumes that you already know what a filter is and have one created.

  1. Inject $filter into your controller

     angular.module('sample').controller('SampleController', SampleController);
    
     /* @ngInject */
     function SampleController($filter) { 
     }  
    
  2. Call your filter by calling $filter(“filter name”)(arg1, arg2, arg3).

    • So in the view you would call your filter called myFilter on myDateVariable with arguments arg1 and arg2, you would use:

        <p>{{myDateVariable | myfilter : arg1 : 'arg2' }}</p>
      
    • To call the same filter from within your controller:

        function SampleController($filter) { 
            var value = $filter("myFilter")(myDateVariable, arg1, arg2);
        }    
      

Read More ›

Angular - Communicating Between Parent And Child Scopes

Here is a quick tip in Angular on how to communicate between parent and child scopes.

If you have a need to send notification of an event from a parent scope to a child scope, you use $scope.$broadcast to send the event.

$scope.$broadcast("parent event name", dataTo Send);

If you then need to send notification of an event from the child scope back to the parent scope you use $scope.$emit

$scope.$emit("child event name", dataTo Send);

To listen to the events regardless of if it sent from the parent or child scope, you use $scope.$on.

$scope.$on("parent event name", function(){
});

$scope.$on("child event name", function(){
});

Read More ›

back to top 