Section: Tech | Atom Feed

01 Apr

Client-specific DNS and DHCP settings with Dnsmasq and Edgeos / Edgerouter

I have my Edgerouter configured to hand out static leases for all my network clients using Dnsmasq, which also automatically puts an entry into the DNS with the client name. The Edgeos configuration for this is relatively straightforward:

dhcp-server {
...
    shared-network-name LAN1 {
        authoritative enable
        subnet 192.168.9.0/24 {
        ...
            static-mapping ...

04 Apr

LEGO®'s new SPIKE Prime BluetoothLE Controlled Robotics Kit

Note

Updated 4/9/19 with some new information regarding the sensors from newly available datasheets.

Lego® just announced their brand-new (as of April 2019) robotics education kit, the SPIKE Prime. It's available for pre-order for US $329.95 from the Lego® Education Store as part number 45678, and ...


30 Mar

Setting up a Raspberry Pi with Python 3.7+ using Ansible

Here's a set of Ansible playbook files to do an unattended compile of Python 3.7+ with SSL on a headless wifi-connected Raspberry Pi. A recent project of mine (bricknil) uses 3.7, and it was a little frustrating to get the default 3.5 upgraded on my Raspbian ...


28 Sep

Part 3 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

This is the third in my series on using Curio to build an event-driven simulator for hardware processes. The first two parts can be found here: Part 1, Part 2. We're going to use the simulator framework to implement a distributed and concurrent hardware palindrome checker in less than ...


27 Sep

Part 2 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

This is the second in my series on using Curio to build an event-driven simulator for hardware processes. (see Part 1 for the first article)

1   Enhancing the Simulator Framework

Now, we're going to make this framework a little bit more robust and less verbose when defining the system ...


22 Sep

Part 1 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

In this post, the first in a series of three, I'm going to show you how to build an elegant simulator of a concurrent system using the amazing Curio library from David Beazley that's built on Python 3.6's async coroutine features. I hope it'll provide ...


28 Nov

How to use Python to generate extensions with a GUI for Moneydance 2017

This post describes some of my experiences writing a python extension for Moneydance, a cross-platform personal finance manager (an alternative to Intuit Quicken). I was originally attracted to this product because it runs on a Mac (albeit using a Java look and feel), uses Direct Connect to download transactions from ...


23 Jun

Elegant command line parsing in Python using docopt, schema, and yaml

Both for my work and personal use, I tend to develop many command-line Python scripts that are very data-driven and configurable. In Python, it's pretty trivial to use argparse to support complex argument and option structures, and then use the integration with configparser to allow one to write files ...


07 Apr

[UPDATED] Reverse engineering the remote control protocol for the Nissan LEAF (the new Nissan EV protocol)

Note

This is an update to my earlier post on the Nissan Leaf remote telematics. Nissan had taken their API offline in February 2016 to address the security vulnerabilities, and this post details how to connect to the new API that went into place in early April.

1   Nissan Connect ...


10 Mar

An Example Provisioning of HACKT on a Centos 7 VM using Vagrant and Ansible

I recently needed to get an open-source circuit toolkit (HACKT)compiled and deployed on my local system. I already knew the C++ source compiled and installed fine on Linux, and didn't want to jump through the hoops to get it running on my Mac 10.11 (El Capitan) system ...


12 Jan

Reverse engineering the remote control protocol for the Nissan LEAF (the new Nissan EV protocol)

1   Nissan Connect EV

Note

Update April 2016: Nissan has updated their API calls to actually use the user login information to authenticate instead of just the VIN. You can see a summary of the newer API in my new post here.

For those of you with a Nissan LEAF ...


09 Mar

Migrating XenServer Virtual Machine VDIs to KVM

After having worked with Xenserver 6.2 for over a year now, I've decided to migrate away from it. It just wasn't stable enough with SATA pass-through on my machine, and it had some really annoying bugs with the way snapshots and backups were handled:

  • Under load, my ...

26 Jan

Building a low-power home file server using Intel's Avoton platform

In this post I'll detail the hardware I used to upgrade my 2 year old home server that was getting a little bit long in the tooth. I wanted to replace a Core i7 based XenServer host connected to an external 8-bay SATA enclosure that had an idle power ...


22 Aug

Setting up the Edgemax EdgeRouter Lite (ERLite-3) in a Home Environment

This is just my cheat sheet on setting up the EdgeRouter ERLite-3 in a home environment. I recently migrated to this after a long search for a low-power firewall and router solution. Prior to getting this beauty, I'd migrated my stand-alone PC running Ipcop/Smoothwall to a Xen virtual ...


07 May

Example of how to authenticate using Oauth2 in Ember.js using Implicit Grant (client-side)

This post will show a quick and complete example on how to authenticate someone using their Google credentials in your Ember.js web application. This uses the implicit-grant scheme in Oauth2, so everything happens on the client side, without exposing the user's Google credentials or requiring a back-end server ...


30 Mar

Detecting color vs greyscale and blank pages during scanning

Recently, I needed a way to detect if a color scanned image was actually color or just contained greyscale/BW content. I also wanted to detect if an image was "blank", or just a continuous shade of one color. I couldn't really find a simple solution on the web ...


17 Mar

One-touch scan enabling in Ubuntu Linux for the Fujitsu ScanSnap S1500

Here's how I managed to get Linux to recognise scan button presses on the S1500, and automatically initiate a scan to a pdf file. You first need to download Scanbd and install it. Unfortunately, there doesn't seem to be any apt repository for Scanbd, so I had to ...


14 Nov

Starting a simple Flask app with Heroku

Flask and Heroku

Inspired by this article on Python Weekly, I thought I'd look into deploying a simple hello world application to Heroku, built on the Flask micro framework.

Here's my workflow:

  • Create a new directory and Python virtualenv (make sure virtualenvwrapper is installed!):

    cd ~/dev
    mkdir proj
    cd proj
    mkvirtualenv ...

04 Nov

Creating new notes and attaching files using Evernote's Python API

Documents to Evernote

I managed to piece together how to attach a new PDF file to an Evernote note using their Python API, so I thought it might be useful to have a post that has all of this information together in one place.  I've put together a complete example that will ...


29 Sep

Quick web app with Go, Ember.js, and MongoDB

 Screenshot

As part of my recent foray into the Go language, I stumbled across this excellent example by Nerdyworm part 1, part 2, part 3 that shows how to build a small web application using the ember.js javascript framework and Go providing the backend server. I took this example, fixed ...

© Virantha Ekanayake. Built using Pelican. Modified svbhack theme, based on theme by Carey Metcalfe