Welcome

Pacific Simplicity is the home to my tech blog of sorts, aiming to assist and provide information easily to other Linux users and Open Source hackers out there.  It contains articles on Linux, system admin hints, scripting, programming embedded systems, OpenWRT and of course Drupal . Check it out and don't forget to comment!

Posted: Tue, 09/13/2016 - 17:48

While scouting about looking for information about the FriendlyArm's NanoPC-T2 GPIO pins and using some of their source - I noticed that the documentation regarding how to setup an LED for example was missing from their forums etc... Here is a quick example:

Posted: Sun, 08/28/2016 - 18:55

Here is a simple program which has init, insert, and search functions to create a linear array of malloc'd structures in a ring-buffer type style'd program. It was valgrinded and only has warnings due to the size of size_t on x86_64.

Posted: Thu, 08/18/2016 - 08:27

Recently went to setup a reverse SSH tunnel and had a few issues such as connections not being allowed, or otherwise. There is also a strong gotcha not documented clearly on the Internet, you can only have one connection per port on the intermediary host. If you want more than one host, you need to use multiple ports; sorry this is the way it is.

Before starting, make sure on BOTH hosts, install:

sudo apt-get install -y openssh-server

Posted: Thu, 07/21/2016 - 15:09

I recently coded this in less than 30 seconds for a student showing how you can create a simple 2D array to return sizes of structs to be used inside of buffer array function. This should be explanatory by itself... the use - its up to you.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

typedef struct type1_s {
    int data;
}type1_t;

typedef struct type2_s {
    int data;
    int data2;
}type2_t;

Posted: Mon, 07/04/2016 - 16:40

Here is a script I finally found on the web after alot of searching when OpenWRT's overlay functionality did not automatically work at boot. This was with the FriendlyARM NanoPC-T2 due to the usage of the eMMC not being quite NAND nor flash etc.. Or having a DTS file or MTD driver etc...