Sample code test

This is hello world code snippet in C++

<code>#include &lt;iostream>

using namespace std;

int main() {
	cout &lt;&lt; "Hello cruel world" &lt;&lt; endl;
	return 0;
Posted in Uncategorized | Leave a comment

Import Module Node JS

I just started working with Node JS and the ESM Standard with the import statement. I got the repeated error SyntaxError: Cannot use import statement outside a module. I searched the internet and this is the closest I came with finding information regarding modules.

Put the following in b.js. It has the value we want to export

<code>export const myValue = 42;</code>

Put this in a.js. It will import the value from b.js

<code>import { myValue } from './b.js';
console.log('The value of b is:', myValue); // use imports</code>

To make all this work, we need to create a package.json file, so that it will allow the import.

  "name": "my-package",
  "version": "1.0.0",
  "type": "module"

Now run it.

<code>$ node a.js</code>

Output should look like this

<code>The value of b is: 42</code>
Posted in Uncategorized | Comments Off on Import Module Node JS

Tracking that feeds NMEA file

The following will do real time tracking using gpsbabel and write it to a file for my Etrex 10

gpsbabel -T -i garmin,baud=38400,get_posn -f /dev/ttyUSB0 -o nmea -F mylocation.nmea

Posted in Notes | Comments Off on Tracking that feeds NMEA file

Read GPS location over serial Garmin Etrex 10

This is the command I used

I attached the Garmin Etrex 10 to Fedora using the USB cable. I put myself in the dialup group and the command executed without issue.

gpsbabel -i garmin,get_posn -f /dev/ttyUSB0 -o kml -F myposition.kml

Posted in Notes | Comments Off on Read GPS location over serial Garmin Etrex 10

Super single

I have been riding the following single speed bike.

Public Single Speed bike on roof
Super Single mounted to the roof
Public Single speed bike on roof
Super Single with the sky in the background
Posted in Uncategorized | Comments Off on Super single

Let’s encrypt for www and non-www

I enabled letsencrypt for today. Turns out for www and non-www, you have to give it the -d option for the and the -d option for the non-www domain. It works now for both. Yay for letsencrypt.

As root, do the following on Debian Squeeze.

# certbot --authenticator standalone --installer apache \
 -d -d --pre-hook "service apache2 stop" --post-hook "service apache2 start"

Posted in Debian | Comments Off on Let’s encrypt for www and non-www

Madbomber2 development using SDL2

I have been working on redeveloping Bill Kendrick’s Madbomber game so that it runs on Android. Bill originally wrote Madbomber back in 1999 in SDL1. When I bought the Android Nexus 7 tablet, I thought that it would be a good platform for running madbomber as it has become a popular game platform. SDL2 now supports Android, so I have been rewriting it for SDL2. I also made the source so that it uses autoconf, so that it will check for proper libraries. I haven’t done a full release of the Android version of the game, but once I do the release of the Android game, I will publish the source for the Android. It’s actually the same source, put you just have to put into the Android build framework. Check out Madbomber2 sources.

Posted in Uncategorized | Comments Off on Madbomber2 development using SDL2

Updated Raffle app so that winner can choose his prize

I updated the Raffle application so that the winner can choose his prize. I need to get this on Git. In the meantime, check the source here. It still has it so that you can pick a prize and then a random winner.


Posted in Uncategorized | Comments Off on Updated Raffle app so that winner can choose his prize

Cereal Hack Raffle Application

Willow Schlanger and I participated in the Cereal Hack this last weekend. We built a Raffle application. We both worked in parallel. Willow built a version in PHP and I did mine in Java. Willow’s app was the most functional in the time for our 3 minute presentation. We didn’t win any awards, but our presentation went well. I continued to work on my Java version. You can download my Java version at the following link: is the version at the time of this writing.

I hope to put a link to Willow’s code soon.


Posted in Uncategorized | Comments Off on Cereal Hack Raffle Application

Running JBoss Application Server

This is about the JBoss Application Server, commonly known as JBoss AS. I have some posts that need the JBoss application server. If you visit the JBoss website, you will notice many projects that fall under it. Make sure you look for the application server.

Download JBoss AS server from the download site.




Unzip or untar it.


some_path$ tar zxf jboss-as-7.1.1.Final.tar.gz


c:\some_path> unzip

Note the path where you started it. If you are using Maven from a different window, set the JBOSS_HOME to it in a different console. Replace <some_path> with the actual value.


 set JBOSS_HOME=<some_path>


 $ export JBOSS_HOME=<some_path>

After downloading it, change to the bin directory and start it as follows:


$ cd bin
$ ./standalone


c:\some_path> cd bin
c:\some_path\bin> standalone.bat

JBoss AS should start. Go to your web browser and check it out. http://localhost:8080

Posted in Java | Comments Off on Running JBoss Application Server