Other Views: By Month | By Category | By Tag Cloud
I am sure that many of you are in the same situation that I am in with needing a different version of node for different projects and you don’t want to have to create a new virtual machine for each project just because of node. Luckily with nvm you can install multiple versions of Node on the same machine and switch between them with a simple command line call.
The one downside to having multiple versions of Node installed is that you have to install the global packages for each version of node that you want them available to. There is no ability to share packages between versions. This means that it will take a bit more disk space but most node packages are fairly small so this should be a none issue.
In the previous tutorial we learned how to mount additional directories within the Docker containers. In this tutorial we are going to learn how to run a Docker container as a service a.k.a daemon for nginx and mysql.
To run a Docker container as a daemon, we run it with the -d flag. This will tell Docker to start up the container in the background and return back to the command prompt.
In the previous tutorial we learned how to install Docker and get our first container running. In this tutorial we are going to learn how to mount additional directories within our Docker container that are outside of the c:\Users directory. By default, Docker only mounts the c:\Users directory inside the docker machine and containers. For myself, I have all of my project files two places: c:\projects and c:\personal. I didn’t want to change my standard configuration just for Docker. Luckily, it is really easy to mount additional directories.
After seeing a Docker presentation recently I decided to finally figure out how to get Docker working correctly on Windows. Luckily it worked out of the box fairly well but I did run into issues with Windows file path lengths and proxy issues. This series of article will documented how I got Docker working and overcame those issues.
To get started, you will need the docker toolkit. I followed the instructions on the Docker website to get the Docker Toolkit with Virtualbox installed. The instructions for Windows are at https://docs.docker.com/windows/. The instructions also have links to the Linux and Mac instructions. As I am a Windows user, I can only verify that this tutorial all worked under Windows.
When blogging with Jekyll there are times when you want to be able to output a code snippet that contains what Jekyll thinks is liquid code. This especially happens when you are doing Angular tutorials since using the double brackets ({{ }}) for data binding. Since the code snippets are enclosed in a pre tag, you are not able to html encode the brackets.
Instead, to include liquid markup in the code snippet you need to surround the code snippet with the raw and endraw tags like so
As I was writing some tutorials recently I wanted to be able to style the html elements that Jekyll outputs with different css classes without having to write the actually html in the markdown.
For example I wanted to use a blockquote for items to be aware of that has a blue highlight as well as warnings to watch out for that has a red highlight. Here is the output of the blockquote with the different styles.
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.
Table of Contents Sample Using This Post
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.
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.
Note: This post applies to AngularJS. The 1.x version of Angular. AngularJS has been end of life at of 12/31/2021.
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.
Inject $filter into your controller
angular.module('sample').controller('SampleController', SampleController);
/* @ngInject */
function SampleController($filter) {
}
Call your filter by calling:
<p>{{myDateVariable | myfilter : arg1 : 'arg2' }}</p>
function SampleController($filter) {
var value = $filter("myFilter")(myDateVariable, arg1, arg2);
}