Skip to main content

Posts

Showing posts from June, 2015

recursive query in SQLite

I'm working on a SQL query that it not very complicated, however, normal SQL is just not going to do the trick. I have simple hierarchy graph data represented in a single table or DAG. Eventually I'm going to dump the data into json document that I will later load into javascript d3js web page in order to render the graph visually. The end result should left us look more closely at the data in order to clean things up and make certain determinations about the quality of the data.

It was simple enough to dump the complete raw data without any processing, however, some simple reporting using recursion was possible using SQLite. This document explained the basics.
export the datacreate the new tables in SQLiteimport the dataexecute and refine the SQL Now I need to take the resulting data and convert it from TSV to JSON and import the data into the web page (example)

6 weeks with my Chromebook Pixel

I have some complaints and while I would like to elaborate in painful detail I just don't have it in me. My point of view starts with a few expectations and for the most part I get a lot of work done and the notion that I need a functioning replacement up and running with little or no effort is at the core. But it's the edge cases that I swore I was not going to let bother me.... and yet they do.
bluetooth support sucksvideo player sucks (no mkv support)cannot rename a USB or SD card.only formats intro the default format (probably FAT; which means there is no support for my huge media??)no containers like docker or rocketchannels is fine; devmode and crouton are a FAILcannot mount remote file systemsGoogle Play apps have some serious security flawsI have not been able to find a way to work the touch screen into my workflow I'm not going any deeper than this. I've had great success developing my code on this Pixel because I'm using a remote system.  I also have 7 Chr…

Skype for the Web

I wish I had something good to say about Skype for the Web. So far the discussion has been vague at best. Simply put; Skype does not support ChromeOS for Voice or Video. Any mention to the contrary would be wrong and incorrect. (not that it won't be available in the future.)

ChromeOS - delete offline files

I have about 650 files in my offline folder and I did not know how to delete them until just a few minutes ago. Someone posted and led me to understand that offline files are marked as "available offline" (not in my case) and that they are located in Google Drive. Then I realized that I had inserted an SD card and initiated a backup.... which it might finished but I could not tell for certain (no notifications or progress bar until I rebooted my Chromebook).

In then end I had 650 files that needed to be deleted.

Turns out that there is a backup folder in my Google Drive that, when deleted, removed the files from the offline folder. The offline folder is some sort of shadow directory. Once I deleted the backup folder the files in question were removed from the offline folder.

Hope this makes sense.

Are Chrome Apps and Extensions Safe?

This conversation will get my blood boiling in a New York minute. I recently posted a question on Google+ (link) How do you know whether or not you can trust a Chrome App or Extension? For example there is an APP out there that seems to have modified my "file" manager offering to install some "services" from this fellow Tanaka. I'm sure he's a fine fellow but he has no obligation or compliance requirement that his code is not going to (a) steal my data and export is someplace else (b) steal my credential and send them someplace else.
Simply put the Chrome user base has absolutely no assurance that the software we are running is true, reliable and safe. Or do we? Ask yourself why Angry Birds needs access to my Contacts. There were some typical responses that all sound like "if it hurts don't do it"; but frankly that's bullshit. The entire world has come to depend on free software of every kind. Many businesses exist only to serve or use f…

GMOs in the food supply

I have no idea what the real motivation is for companies like Monsanto other than the profit motive. If the human race was on a head's down course for an extinction event I could understand why we might modify the food supply in order to give the human race the opportunity to catch up and recover. But making changes for the sake of change or profit is just so very wrong.

Some day we might learn that GMOs are worse than smoking and that the human race is now speeding toward an extinction event. At least with smoking one could quit, asbestos, mold or lead paint one could re-mediate to safety. Once GMOs and other super-gene strains make it into the food supply we will not be able to stop it.
art imitates life; there was a lifetime show where the antagonist was food company who owned some custom engineered plants that had germinated into a nearby farm which they were now embroiled in legal action because the food was migrating (infecting the neighboring farms)  I really hope these labs…

is search broken

A friend of mine wanted me to construct a system that would trigger either a shopping cart instance or an alert email when Nike's one-off shoes arrived. Forget that there are a number of programs out there that perform that function but it's clear that it's also an arms race and as such falls into game theory.

Enter search...

I'm curious to know how many Chromebooks other than just the highest end Google Chromebook Pixel uses the Intel i7. But when I tried to search for them I got a wide mix of products. Needless to say the results were less than stellar; downright disappointing as it was mostly advertisers doing the bait and switch thing.

I tried:

GoogleDuck Duck GoBingYahoo and I even tried Amazon.

you have been contacted by network services

The pitch is the same.... the phone rings and the number is usually a strange 7 or 8 digit number preceded by a plus (+). When I answer there is a slight delay and the phone is now showing some other number and in my case it was 337-729-7536. The person on the other end have been both men and women, however, they have always had a distinct accent that I can only place in Pakistan or India. I do not have an extensive experience with voices, however, in one instance I was able to get the person on the other end to admit she worked in an Indian call center. I have no idea what they are actually accomplishing because it never gets that far.

During this evening's call I asked a few questions:
where are you located? CaliforniaWhat is the name of the company? Orange Tech In Los Angeles When I Googled and called Orange the number had been disconnected. I told the caller that I was putting the kids to sleep and that I would call back. What is your number? 866-263-2630 When I Googled this num…

Google plays some hits

Since today is TBT I thought I'd give Google Music a chance to impress me with it's selection. I checked out GM's 00's selection and it seemed focused on some form of rap & pop. It looks like a Justin Timberlake, Snoop Dog reunion of sorts. Then I tried 90's and that was almost completely dominated by rap. When I got to the 80's I found one that was considered electronica and 2 others that were dominated by Michael Jackson.
First of all, if I were a country star I'd be pretty pissed. Even though I'm not a true fan there is plenty that I would listen to like a selection of Garth Brooks; and there are plenty of others. Punk and Metal were totally absent. I could be suggesting that either Google knows it's average user but that it does not know my taste.

housekeeping chromeos

I've installed a few things that I need to get rid of. The reasons differ but nonetheless they have been deleted.

1) Music Bubbles is a pretty cool app. It's a remote control for Google Play Music. It's cool because it's injected into every webpage and does some z-layer alpha blending that makes it appealing. My only complaint is that depending on where you locate the bubble it will take over when you hover. Meaning that if you drop the bubble over a menu item you'll not be able to access that menu unless you move the bubble. Also, since there are keystrokes like CTRL+1 to access the first tab... it's just some overkill.

2) Bouncing Ball - It's just a silly little game from Google. I like the aesthetic. The game is fluid and kind-of fun to play although I was bored after the first 5 minutes. I have not played the game in a few weeks so there was no point in keeping it.

3) Mosh - I have never been a fan of mosh. The authors make certain claims about it's…

de-google yourself?

I'm concerned about my privacy and personal information security; this morning my father pointed me to this article that espoused all the evil things that Google does with my data, cookies, email, and personal information.

I does not take too much effort to debunk everything the author lays claim too in fact it is also demonstrated by (a) the publisher of the article (b) the commenting system therein (c) and it's advertisers; as they are all part of the profit machine trying to monetize it's visitors. (no different than Google just on a different scale)
the publisher's site was closed for comment, however, that information was not available to me prior to registering. Had commenting been closed I would never have registered. The author of the article made certain recommendations and claims;

Step 1: Spread your data.

This might do more harm than good.  Spreading your data means that the premium associated with your data is higher. (the sum of the parts is less expensive…

programming languages - the next thing

I've been a student of programming languages since I started programming in the early 80s. Back in those days there were only a handful of mainstream languages that were accessible. At first there were two computers to choose from. An Apple ][ or a Radio Shack TRS-80. Both included a ROM based BASIC interpreter.

Other compilers were available, Radio Shack had COBOL, Fortran, pascal compilers and and Assemblers. Apple had it's own toolchain, which I never experienced first hand but I recall my high school friends were writing programs in something other than 65x assembler.

When the IBM PC entered the space the tools changed again. Borland International started selling Turbo Pascal which turned into , Turbo C, Turbo C++, Turbo Assembler, Turbo Prolog, and so on. These tools were reasonable priced and were simply awesome. Soon after Microsoft entered into the tools war polluting the API at every turn but nothing beat Borland compilers.

Sometime in the middle of all that there was…

reflection on golang reflection

I'm building a transaction gateway that requires the transcoding message from one schema to another. The messages will originate from the client as a JSON string which is easily parsed by the stdlib and then transcoded to a bytestream based on some schema. The server will process the transaction and return another byte stream which must be parsed according to some schema and then transcoded back to a JSON string and returned to the client.

My challenge, as I review the encoding packages, is how or where do I store the DDL (data definition language) for the byte streams? One easy representation is in the golang struct with the schema contained somewhere in the field types and the tags.

The question, however, is it better to use reflection at runtime or precompute some DDL from the struct or just manually construct the DDL?

Some weeks ago I reviewed some code for an ISO8583 encoder. It did a good job of parsing messages into it's perspective fields, however, in their implementat…

I have 5 bars - what is in a number?

I have two Apple Macs sitting side by side on my desk. They are connected to my Airport Express on the other side of my house and they are showing 5-bars in the AT&T vernacular. I find that extremely curious because my Nexus 6, Samsung Chromebook both show 2-bars. And while you might say something about the quality of hardware or the vendor... I also have a Chromebook Pixel 2 i7 and as Google describes it, the Pixel 2 is all premium hardware meant to be bar that all other CBs are meant to reach for.  My P2 is also showing 2 bars. What does this say about Apple? Is their hardware tuned differently than everyone else or do that physics of WiFi radio transmission and reception not apply to Apple engineers. Or is it possible that their "computation" of WiFi strength is optimistic and everyone else pessimistic?

I'm not one for regulation but when faced with a sub-par WiFi environment, like a house constructed with iron rebar and aluminium studs, and when faced with purcha…

What does it take to get a +1 or LIKE?

I often wonder what it take to get a +1 from my readers. I admit the ratio of readers to comments and likes is pretty low. If I had to guess there is probably some Pareto number that makes the most sense.

Like things within some SOI (sphere of influence; social or otherwise) I've encountered family members who like everything anyone else in the family posts. The same can be said of some employees who do much of the same. I'm no psychologist but my intuition is hinting that the motives are vastly different depending on how they are each perceived. (Some Family LIKEs can be perceived as social climbing and some work LIKEs are sincere) Like thing when you agree or even strongly agree But what happens when you disagree? Would the reader comment? Argue? And is a comment as good as a LIKE? Like thing when you've made it through the presented material Whatever the material is the reader managed to make it all the way through the material and was able to form an opinion about the con…

Docker Gotchas

I've watched as the memes have gravitated to Docker like bees to nectar or flies to poop. I guess that's a half full half empty thing. As I've said many times in the past you gotta know your stack. And the more I use Docker and the more they advance the project the more I realize that it's just too early for adoption... unless you have a person or three on the inside.

By example my first CoreOS+docker server is continuously running out of disk space in part because btmp is filling up (which I've read is probably an attack). My second CoreOS+Docker server shows an explosion of files in the Docker overlay folder. I'm not certain why I need so many folders and if any of them are zombies or not.

Another article made mention of my filesystem iNodes. While my filesystem is at %5 used and iNodes at 15%; which is not an unhealthy ratio, in my opinion, but since this is a single Docker container running on a 200GB HDD it suggests that getting any sort of density is goin…

SmartLock - what's it good for?

SmartLock is a tool that joins your Android phone and your ChromeOS device. When logging into your ChromeOS device it will attempt to locate an open or unlocked Android device. When ChomeOS identifies the paired device it it will change the lock icon in the login dialog from yellow or spinning to green.  The green icon means that I need only click on the picture in the login form in order to perform that function.

There is a related feature on the phone.  I can identify and record "safe" locations on the phone so that when the phone is found to be in that location it does not require a password. You are automatically logged in by GPS location. This is great when you're home or maybe even work... if you do not mind the obvious complications.

So you can see that if your:

homeSmartLock knows home is safethe phone has auto unlockedand paired with a ChromeOS deviceand the devices are in range your ChromeOS device will auto unlock with a click of a button. (you can temporarily …

Making OpenVPN work inside a docker container

There are a number of possible solutions.  The first looks like a storage container but provides network access. It's a novel approach and one I might implement in the future. It has the benefits of configurations that might differ between prod, stag and dev. It also isolates the network issues from the application container.  It's actually a very strong idea.

In my case it's more complicated that I want.  I have a simple workflow that I want to follow for the time being.  Taking my default Dockerfile I did a chmod +s to the openvpn is running with root privileges which is required in order to update the routes and IP address.
run chmod +s /usr/sbin/openvpn AND when running the docker container there are two additional params: cap_add and device.
docker run --rm -it --cap-add=NET_ADMIN --device /dev/net/tun -v /data/data1/devbox/shared/:/var/shared/ --name=${boxname} ${imgname} /bin/${shellname} --login And that worked for me.

One other recommendation was installing sudo. …

using tmux or GNU's screen in a docker container

There are too many open issues with the docker project pertaining to the use of TTY and Docker. It seems that Docker uses or supports /dev/console. I suppose if I was running ssh-server in my container that I would likely have a working environment.
Sadly it seems that there is a correlation between tmux/screen and it's expected normal operation.
That's it for now. I'm going to give up on this branch because it feels meaningless.

starting or exec'ing a new container

I'm not going to elaborate on the problem too much other than to describe the challenge and then provide my script that solved it.

I'm using CoreOS(685.0.0) + Docker(1.6.2) in order to host my own development environment. The benefits are already well known... a consistent environment for my code and testing. There are a number of real challenges getting to a shell prompt and not blowing out my disk space as I create more layers and images of the same sandbox.

Here are some of my requirements:

launch fastshared source / data / certs / config (with or without a data container)able to build my go projectidiomatic go structureable to connect with multiple terminals to the same instance without having to run the ssh server The script below launches(run) my container if it's not already running and attaches(exec) if the container is already running.



#!/bin/sh
imgname=devbox
boxname=devbox
shellname=bash
CONTAINER_ID=`docker ps -q --filter "name=${boxname}"`
RUNNING=`docker i…