Technology, science, cybersecurity


last update:

Go Hugo!

De dames van Moonstreet zijn al een paar jaar op zoek naar een prettig blogplatform. We hebben de volgende wensen: Geen database Markdown support Goedkoop Gemakkelijk in gebruik Met die eerste requirement vallen er al een hoop af (Wordpress bijvoorbeeld). De overige wensen schreeuwen om een statische platte website. We hebben gekeken naar Octopress en Jekyll maar die luisteren nogal nauw qua Rubygems. Ik zat dus niet in de dll hell, maar in de gem hell.

At work I find myself using Powershell a lot. Here are a few tips to use Powershell without Googling all the time. Suppose you want to check if there are any PST’s on a harddrive and let’s pretend you know nothing, just like Jon Snow. Find out what cmdlets are available with Get-Command Obviously we need to recurse directories to see if there are any files with a .pst extension.

Yesterday we ended with a developerish Powershell script: $pst = Get-ChildItem -Path 'c:\' -Include '*.pst' -Recurse -ErrorAction SilentlyContinue foreach ($f in $pst) { $name = $env:USERNAME + '-' + $f.Name Copy-Item $f.FullName -Destination "C:\temp\pst-share1\$name" } It loops over all objects in the $pst array. Foreach item in the $pst array, it generates a new file name and the item is copied to another folder with the new file name.

Today I took the plunge and installed Debian instead of Windows 8.1 on my main machine. Indeed, on the bare metal. I first checked if my hardware compatibility. There’s an awesome (portable) tool called [HWiNFO](«") you can run and check what hardware is inside your computer. Then you can check if there’s Linux support. The most important hardware pieces are video cards, networking hardware and audio. For instance, I happen to own an Intel 4000 HD Graphics adapter.

I have to admit that trying out Linux Distributions is one of my guilty pleasures. I enjoy configuring my desktop just the way I want it and to be in full control. Working in the terminal makes me very productive and now that I’m getting the hang of Vim it’s totally addictive. I’ve tried Vim (and NERDTree) on Windows 8.1 but it’s just not the same. For instance, if you drop to a shell the dosbox opens whereas I prefer to stay in the same terminal.

Onto the next step on my journey learning Node. I’m going to create registration system for informale care volunteers. Volunteers can sign in and provide all sort of details about themselves. If you are a volunteer and you want to go on vacation or just need some rest, you can browse the directory and find a replacement volounteer. We basically need an addressbook of volunteers. The first functional specs are: * we need a volunteer * the volunteer can have a status like available or unavailable * the volunteer has all sorts of charecteristics which he or she may edit herself.

a Node HTTP Server

Just like c# (which is my first language), you can import libraries with Node. They’re called modules. One of these modules is ‘http’. Let’s see how we can create a http server with this module. //hellopizza.js var http = require('http'); //the http module has a function: createServer which takes a callback as a parameter: http.createServer(function(request,response) { response.writeHead('200'); response.write("one pepperoni pizza please"); response.end(); }).listen(8080); console.log("listening on 8080"); We can run this with node:

Fun with Node.js

Now I’m starting to have fun with Nodejs. This is because the excellent tutorials from Node tuts and because WebStorm is awesome. Here is a first line of javascript: console.log('behold, the pizza is in the oven.'); Let’s run it with Node: $ node hello.js behold, the pizza is in the oven. Why is this even cool? We just ran javascript without a browser, on a server. Blocking vs non-blocking This is an example of blocking code:

This is how to install Node on a Linux system: #Install Node echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc . ~/.bashrc mkdir ~/local mkdir ~/node-latest-install cd ~/node-latest-install curl | tar xz --strip-components=1 ./configure --prefix=~/local make install # ok, fine, this step probably takes more than 30 seconds... curl | sh For Webstorm we need the SunJDK. #Install SunJDK #get the JDK $ wget --no-cookies --header "Cookie:" "" #unpack it $ sudo tar zxvf jdk-7u45-linux-i586.


I have been using Linux forever. In 2003, I registered at Linux Counter. . I have been using tons of Linux distro’s. I’ve started with Caldera, went on to RedHat and used Slackware for a while. After then I sorta stuck to Debian and Ubuntu. And recently I’ve found CrunchBang. I think it’s quite good. Why CrunchBang is cool #! lots of keyboard shortcuts terminal here in the file explorer easy software install fromt OpenBox menu feels like home: #!