Crypto Status for Onion’s Omega2+

Standard

A long time ago on the magical world of this blog, and the opinion cloud  Twitter – I teased this photo:

Well since that photo I had the folks at Onion hit me up:

I did and today, after much waiting, a finally fixed up Onion (Wifi Problems) I’m tonight online and have finalized the guide! Without further backstory… Here’s the quick and dirty guide to getting it running:

Step 1: SSH In.

Get your self all ssh’d in and get ready for some copy and paste magic first off the bat is some key elements some may already be installed so any errors you hit saying “Up to date” or “Already Installed” are safe to ignore – here’s the one-liner:

opkg update; opkg install php7-mod-openssl php7-mod-json php7 php7-cgi php7-cli bash

This will handle everything you’ll need based upon some PHP trial and error no php.ini mods are needed for PHP, just install and you’re good to grab the feeds and get things rolling.

Step 2: A sprinkle of BASH

Grab the sh file, and for this instance save it as: coins.sh – Download it here, or copy and paste below.

This is not required, but it is what I will reference this file as moving forward, so if you change it, run the change through the entire process.

[UPDATE]: If you are just wanting general coin prices? Set all values to 1, it will simply return the value of a single coin if you’re just monitoring the market in general.

#!/bin/bash

## Set Your Currency
curr=$'USD'

## Coin Amounts
ltct=$'200'
btct=$'200'
etht=$'200'
dasht=$'200'

## Clear OLED Screen
oled-exp -i

## Create Values
btc=$(php-cli coins.php 'BTC' $curr $btct)
eth=$(php-cli coins.php 'ETH' $curr $etht)
dash=$(php-cli coins.php 'DASH' $curr $dasht)
ltc=$(php-cli coins.php 'LTC' $curr $ltct)

## Display on Screen
oled-exp write "CURRENT VALUE\nLTC: $ltc\nBTC: $btc\nETH: $eth\nDASH: $dash"

Basics, set your currency I’ve got mine as USD for the US Dollar, however, you may be elsewhere in the US, just put in your currency type and you’re off!

The second edit is your coin types and amounts – I didn’t do anything fancy here, just be sure anything you add is added to the value calls in Create Values, the format is:

VARIABLE FOR OUTPUT=$(php-cli coins.php ‘COIN TYPE‘ $curr $COINAMOUNT)

Lastly is the display to the screen, and you can format this as you see fit, but the \n is a new line, so anywhere you want a linebreak add a \n.

Step 3: A pinch of PHP

This is the PHP side of things which grabs the data, name it coins.php – Download it here, or copy and paste below.

<?php

/****
coins.php (v.04a) by Chuck Brown (http://www.zagnu.com/coin-source.txt)

A simple API call to get the value of a coin in the user's desired currency, great for using in Google Sheets (Use: =IMPORTDATA("yoururl") or if you simply want to grab
the current value of a certain coin. Currently geared towards USD, but hope in next version to add proper currency markings for the amount conversion.


## Changelog

.01 -   First Release
.02 -   Adjustments to code & calling methods.
        Changed from XML output to plaintext for use of IMPORTDATA vs IMPORTXML
.03 -   Removed dual posting of plaintext price for import & added amount conversion.
        Commented code.
.04 -   Added Conversion for ATM without Value Text for Onion pull - Also adding $ for easier formatting on Onion curl call.
.04a -  This is the Omega2+ version, can then be gathered from CLI vs. Installing Apache.
***/


//Get Data
$url = file_get_contents("https://min-api.cryptocompare.com/data/price?fsym=".$argv[1]."&tsyms=".$argv[2]."");
$json = json_decode($url,true);
//Check for Amount to Convert
if ($argv[3] != '') {
$value = $argv[3] * $json[$argv[2]];
$tvalue = round($value,2);
echo "$".$tvalue;
} else {
//no amount? provide plaintext response for dollar amount.
print $json[$argv[2]];
}
?>

Now if you look at the line that reads:

echo "$".$tvalue;

The $ is your currency format, so if your not using the USD as a default, just make a quick tweak and set it to yours.

I do have a slightly more up-to-date version I’m toying with on the PHP side, with configuration options up top for easy configuration & coins to take some of the bash config out of the equation and use an array to generate, but again still a very early release.

Step 4: Schedule with Cron

This can be run fairly regularly, however, be mindful if you are wanting to say lookup values every 2 minutes, Cryptocompare.com is going to block you. So every 30 works for me:

*/30 * * * * 

However if you want to do something a tad different, work on it with Crontab.guru. Handy tool, but I give that first so you can figure out your schedule then on the command line here’s what you need to do:

chmod +x /root/coins.sh
crontab -e
[PASTE in your schedule] /root/coins.sh
:x! {PRESS ENTER}

Next with that in place simply restart cron:

/etc/init.d/cron restart

And boom, you are off and running. Now be aware that cron will take and pick up at the next window, so let’s say you used my example and said every 30 minutes? Well if it’s 11:45 PM like it is now, it won’t run again until midnight. If you are before 11:30 PM it’d run at 11 PM – pretty simple.

Wrapping up!

Again probably not the cleanest code, or the most elegant, but it does a job, and has given me a nice little readout on coin values. I’m open to any and all comments and suggestions, happy to give credit where credit is due and post updated pastes and post info as improvements are contributed!

Thanks to Onion for a great little device! Quite handy indeed!

Once you go Chrome….

Standard

So I have been pondering things for a while related to switching away from the world of Mac. I actually just sold my Samsung 503 Chromebook to an old friend, it goes to live with her on Wednesday, and I have the C200M on the block to be sold as well.

I have been looking at the Chromebook 15 from Acer, it’s a 15-inch touch-display, Android Apps without any dev channels, beta channels or nasty hacks to get them work. I checked a box and it’s done.

I love the screen, the speed, the specific nature of what I can do, honestly its a good fit with a 12-hour battery life, and USB-C for charging its a nice fit. Different. What Mac always was about – but lately I just feel like Mac is becoming more about what they can put into a product to make a few more dollars. Everyone’s got to eat.

But we shall see how it goes, I’d love to have it all pan out and become my daily driver – and over the next few days. Chome is now my home? Time will tell.

Time for a Tech Yard Sale?

Standard

I think it might be.

I’ve managed to get myself a small pile of tech, some of it was given to me, some was purchased, but with all of it nowadays, it has no direct use.

I have some tablets and laptops which need new homes. I’m trying to decide how to go about selling these things. I’ve considered eBay for a few items, but most are still working hardware just not actively in my workflow anymore, and while some day some of it could be? I’m looking to offload it.

I’ve considered too Facebook’s selling area, or even OfferUp – so there are some options but stay tuned, likely in the next few weeks going to be some items up for grabs.

PS:308 – Coding Day

Standard

So today is a coding day, trying to clear my head and dig in, I’ve mapped out 99% of this, working on streamlining functions for this and basically re-inventing how an existing app works to help keep the lights running. Oi.

I’ve got myself notes on the current database, file structure, and going to tie that all into a magical little script which works to build a backup of data which the current system has no backup option at all, going to make it on-demand too for the customer + tune up some old code aside from this new number.

Low on sleep, but writing strangely helps clear my brain, even if I’m not skilled at making sure the correct form of “your” is in there 😉 I do what helps and this helps focus and clear my head, so now, onto the fresh dev box I just built out to get coding. Happy Tuesday All!

Not everything is something.

Standard

It’s been a while since I’ve taken a break and just wrote. Not part of the “Post Something” I do daily, and with this sad moment, I’m waiting right now for three emails, five server updates, and Lilly is playing with a birthday gift – I’m taking 5 minutes to write.

Hackintosh. While I could have just gone down to the Apple Store at the mall, I can’t get something custom, and with the MacBook Pro cropping up with errors. It was time to look, and an iMac would have been nice, but if I bought from the store I’m limited to stock configurations 🙁 Thus enter the Hackintosh.

The thing I love is ease of upgrade! Too I’m getting 2x the power of my Macbook Pro, and room for things like additional storage. 32GB of memory for a fraction of what Apple would charge me, and in the end because the original build I wanted going out of stock, I saved $120 in the end switching to a smaller build (ITX based).

Parts should be here tomorrow, I’ll likely post some to Instagram, maybe a post on it here, and a follow-up on maybe Tech Friendly Help (which if things calm down further, needs some TLC!).

Well my writing time is nearly done,

TFH

Standard

TFH. That’s the new site. No link. No major details. Just I’ve decided on a project. I’ve talked to a few people about it with mixed feedback, but I think I’ll give it a whirl.

What will it be? Not 100% sure. Part YouTube, Part Blog, Part Social Media Explosion! (Yes I said explosion.)

I have wanted to do a project like this for some time. I like the idea, I like the name, I like it a lot. As I build things out I’ll give some sneak peeks of the site, maybe too let friends in, to give feedback.

Been busy lately! Doing a lot of prep for this new site as I want it to be a go-getter out the door, even going to start building articles. I want to give this a honest and full resources try as a alternative source of income! (Some folks are making $8k->$30k doing this stuff!)
Leading into this next week I hope to have so many projects off the table, so much I fired a customer today. Well rather put my foot down and said “Here are my terms to keep working” a few others I am going to weed out. As an old boss went over once with folks “Angel Customers vs Demon Customers”. While these few I’m weeding out aren’t demonic they are huge time issues.
So a lot of things moving forward, projects with more hours, building out two servers tonight! Lilly Grace is having better nights! (Actually GIGGLED! in her sleep! Teething break!) I must say a nicer thing to be hearing as I work 🙂

Keep me in your prayers, a lot happening! This old body is trying to keep up!

Oh and one last thing… Who’s 1, and got a 2nd $10 Jamba Juice gift card from daddy’s IT Job? This cutie:

Writer’s Block

Standard

I’ve been wanting to write lately, but what to write?

I am back on a kick in which I’ve said to myself:

“Self, start a website”

And yet, I have 3 current website projects for customers which I have yet to complete. Some are hold ups on “approvals” others are ones I’m stuck and trying as hard as I can to complete.

The desire is on my heart though to create a website which is helpful, one that works in the realm of Q&A, providing visitors with a portal in which to have common tech questions answered.

“But where is the money?!”

Well I set out to answer that question, and did you know there are bloggers out there posting about their passions, expertise, and even just helpful tips who make anywhere from $3,000->$10,000 a month? Well I didn’t either, but I’ve found a ton and their sites are actually fun to read!

I am leaning more and more towards the project, may not be the BEST use of my time, but at the end of the day, I think I’d enjoy it.

The personal blog isn’t as much as a huge desire for me anymore, I still want to try and do a post a day to provide a personal outlet – but I’d like my posts to be more than just a place to vent.

For now, keep checking back – maybe something random or a picture of a cute kid now and again 🙂

Project Fi so far….

Standard

fi_logo_sq_1200So in getting started with Project Fi, I got 2 boxes, my new Nexus 6, and the “welcome kit” which included a case, headphones, and a battery pack for giving me some on the go recharging ability so all in all not too shabby.

Now one thing I can safely say so far (I pray it doesn’t change!) is the ease of customer support! Live chat twice now has me taken care of without a hiccup, all easy fixes, even the # porting was confusing, I have a Google Voice # which I’ve had since Google Voice was Grand Central, even had a $1 promo credit, all that said it could take 5 days to migrate, was done in about an hour – and then a hangup with texts routing only through Hangouts was a quick Hangouts App upgrade, then un-checking a box. Easy.

So how do I like it thus far? An under 24 hours review? Pretty awesome:

I am paying $50/m which breaks down to $20 unlimited talk/text + $30 for 3GB of data, which is pay for what you use, even if I go over I like that it’s simply billed by what you use, so if I use 3.1GB of data, I get billed $1 extra. Simple. Easy.

I’ve used the phone around town a little, again under 24 hours and even now I need to work on a project to fix fonts, but I’m exhausted and its nearly 1AM – but I love the service thus far, it’s kicking butt where Verizon is lacking, even tonight according to a handy little app I found in the ever amazing Project Fi Google+ Community, I’ve been on Sprint’s Spark network – I made a call without issues, no lag, no delays or as I like to call those things now “Acceptable Failure Rates” according to Verizon Wireless.

So far in Bakersfield at least where Mighty Magenta and Big Red have made claims of “EVERYWHERE NETWORK” and where maps bleed magenta all over this town, there are serious dead spots, now big score to Magenta is that they have WiFi calling, solves a lot of issues, now Big Red offered me the honor of buying a booster which uses the internet, but costs me $250, a manager offered $35 off, and a phone support rep claims their manager offered $75 off, but to buy MORE to simply be able to use my service with Big Red? No thanks.

What does this mean? Jump ship go all in Google? Not just yet, again this is day 1, by Monday I may be cursing its name, but even so the Nexus 6 works with AT&T, T-Mobile, Sprint, and rumored well with Verizon, so I have options if it simply doesn’t play well moving forward, but so far I’m hopeful, and just like the G1, I enjoy trying Google’s koolaid 🙂 (It’s grape!)

Got any questions? Want to try to get an invite to join in? Visit http://fi.google.com/ and sign-up with your Gmail account today, or if you want to take a peek at the hardware and setup, hit me up on hangouts, invite me for Starbucks, I’ll get you a look 🙂

I want to build a website…

Standard

So I work in the world of websites, and I buzz around and see some great content out there and think to myself it’d be great not to really compete but more add to the world of content out there in the tech realm.

Some great content like MKBHD (YouTube/Twitter) which does amazing tech reviews, this kid is awesome! Giving a fair review of hardware, giving even big companies his wish list on what he’s not really a fan of, he put together a video about building a dream phone!

Now in comparison I hit a video which I’ll leave un-named/un-linked which in their review of the Nexus 6 the reviewer off-camera begin to rant and swear a bit about the camera and a few other features. Now granted everyone can have their opinion, but there are so many more words in the english language which could have to really deliver his frustrations for the lacking of the phone.

Lastly I’m a big DIY guy, this sometimes frustrates Daisy to no end sometimes I think, because where she sees a time to “Call the repairman” I see the “well let’s take this apart” or “I can buy the supplies we need to do this ourselves!” I’m no different when it comes to tech, to the point that I’ve had massive Emails & Facebook Chats with folks about doing some self repairs. Sure sometimes they end up saying “Too much!” and come drop off a desktop/laptop – but I’m a solutions guy, if I can teach I’ll teach – same way I am with my customers.

So what would be a good fit? I’ve looked at doing a Q&A website, just let folks tweet/email/im whatever their questions, and then pick a handful to answer and give my spin? Sure I could do advertising and maybe like the ol HappyPalm days with Roger, Jon and Jason we could pick up some freebies here and there, but I’d love to make my side job less odds and ends and more knee-deep in reviews and helping folks vs. helping a single company with computer repair.

Got an idea? Help me brainstorm this a bit! Maybe it’s time to bring HappyPalm back? Jon? Jason? Roger? Feel like getting geeky?