03 Dec 2017
What is K-means?
It is a clustered, unsupervised learning algorithm
What do you use it for?
You have n objects and want to split them into k groups. n is normally much bigger than k, so you want to have multiple objects per group.
- You have n addresses and want to build k post offices to best cover them all.
We will first cover the case where we know k, but you might also want to figure out what the best value for k is.
19 Feb 2017
Symbolic links, or “Symlinks” are a fundamental part of the Linux toolbox. They allow you to make a file or folder accessible from another location as if by reference.
Symbolic links are used everywhere in Linux. Many applications like apache2 and nginx require them for their configuration files, and they can be a powerful tool for your workflow.
13 Feb 2017
This blog is hosted on github pages using jekyll, a static website generator.
While there are several guides for installing jekyll for Windows (official github pages article, Run Jekyll on Windows) They seem to skip some key points that have given me trouble with the latest version of ruby (2.3.3 as of this writing) on Windows 10.
Having struggled through this twice now on two separate Windows installations, I’m making this guide so that at least I’ll be able to refer to it quickly. I hope it helps anyone else that has issues getting
jekyll serve to just work as intended.
11 Feb 2017
Here is a small collections of tips and tricks with the intention to help improve usability and general productivity when ssh-ing into a linux machine. It was written with Ubuntu/Debian in mind, but should also work on other linux versions such as Mint.
What this post covers:
- Use history and grep
- Use the command line faster
- Use nano for config files
- Some useful applications
- Customize your .bashrc file
For the most part these are all fairly straightforward and this post will probably contain nothing new for anyone that has a fair amount of linux experience.
25 Jan 2017
In this post I will discuss setting up port forwarding to manage a local linux virtual machine through ssh, with a focus on mirroring the workflow you might follow with a dedicated Linux server.
This guide will be using Ubuntu 16.04.1 and MobaXterm as the SSH client. You are welcome to use another SSH client such as bash for windows in Windows 10 if you so choose.
29 Oct 2016
This initial post will cover what Premake is, why you should use it, and provide an example project you can download and try out for yourself.
Future posts will expand on the provided example by walking through the process of setting up more complicated premake configurations, such as cross-platform libraries and dependencies.
23 Jan 2016
Some versions of gnu
make for windows can encounter an exception when you try to run a make file with them:
I encountered this issue, and eventually stumbled upon a stack overflow question, the top answer of which recommended explicitly passing SHELL variable. This did indeed fix the problem for me:
Solution 1 - The Quick Fix
When running make, pass in this SHELL variable:
Either along with the command line arguments, or just add it to the top of the make file.
This solution works, but doesn’t fix the actual problem: why is
make unable to find the shell?
01 Sep 2015
Approach 2 - MSYS2
In this approach we’ll be installing MSYS2 to create a unix-like dev environment on windows that we will install clang and gcc on. That dev environment will then be interacted with through its bash shell.
01 Sep 2015
Approach 1 - Clang 3.7
In this approach we’ll be installing Clang 3.7.0 and gcc 5.1.0 (via MinGW-w64), to allow us to build and link with clang from the standard windows command prompt.
01 Sep 2015
In the past I’ve struggled getting clang to work on windows in as complete a capacity as it does on mac or linux.
I tried a few online tutorials and suggested solutions on stack overflow, but all of them had one drawback or another:
- Some solutions required you to use a separate linking step (since as of the time of this writing clang for windows does not have its own linker)
- Some solutions required massive
-l compiler flags so that all the proper headers and libraries were used.
- Even when some solutions mostly worked, they often were unable to handle both 32 and 64 bit.
- Some required you to build clang from source. Not a problem in its own right, but not very convenient, especially when compared to other platforms:
apt-get install clang-3.5,
brew install llvm --with-clang --with-asan, etc.
So over the last month I tried to come up with a reliable tutorial to get clang to compile and link on windows 8.1 that would avoid these issues.