Saturday, December 02, 2023

Monggo con Carne with Tomi Chips: Filipino-Style Chili

A favorite chili recipe of mine originally at https://www.pepper.ph/filipino-chili-tomi-chips/ seems to have been permanently removed. I couldn't find it anywhere on the Internet except from the trusty Wayback machine, so I am going to post it here in case anyone else is searching for it.

Monggo con Carne with Tomi Chips: Filipino-Style Chili

June 17, 2014 Tagged: beef beans filipino

  • Mikka WeeWORDS
  • Mylene ChungPHOTOGRAPHY
  • Katherine JaoSTYLING AND RECIPE DEVELOPMENT

There are just some days when I need my bowl of chili. Regarded by many as one of the top players in comfort food lists, chili can really be all you need to get through a stressful day. When daydreams start to kick in, and visions of a piping-hot bowl filled with robust, beefy flavors finished by some tart sour cream start to toy around with your brain, you know that the calling is loud and clear—make some damn chili. But here’s a version that might just tempt you to up your chili game.


Mung Beans (monggo) aren’t the most attractive veggies around. These round little dark-green spheres are always shadowed by the brighter-looking produce. But mung beans, in fact, make a great chili base. They’re a good choice for thickening agents, and that’s what we want in a good stew or chili. It’s also a healthier alternative if you’re gunning for a six-pack.


The versatility from the mung beans provides a lot of room for creativity. The deep red sauce spiced with paprika provides a gentle heat with a kick from the cumin. Finish it with a generous sprinkle of our beloved Tomi Corn Chips that provide a nostalgic sweetness that can only be traced to our childhood days.


The idea may seem hilarious on paper, but might I say, it’s one of the recipes I wolfed down on my own—without sharing.


Monggo con Carne (Filipino Chili)

Total Time: 120 minutes | Yield: 8 servings

INGREDIENTS

  • 3 tbsp olive oil
  • 1 tbsp garlic, minced
  • 4 pcs bird’s eye chili/ siling labuyo, chopped
  • 1 pc white onion, chopped
  • 1 cup ground beef
  • 200 grams uncooked monggo
  • 2 cans crushed tomatoes
  • 1 tsp paprika
  • 1 tsp cumin
  • 1 tsp chili powder
  • 2 beef bouillon cubes
  • salt and pepper, to taste
  • enough water to soften monggo (about 4-6 cups)
  • sour cream, as topping
  • cilantro, as topping
  • Tomi chips, as topping

PROCEDURE

  1. Heat olive oil in pot and sauté galic, chili, and white onion for 2-3 minutes or until soft but not browned.
  2. Add in the ground beef and sauté until cooked.
  3. Add in beans, crushed tomatoes, paprika, cumin, chili powder, and beef bouillon cubes. Mix well.
  4. Pour water and let it boil. Cook until beans are soft, to your liking. This will take about 60-90 minutes.
  5. Once softness is achieved, and consistency is thick, adjust the seasoning to your liking.
  6. Turn off the fire and transfer to bowls.
  7. Top with sour cream, chopped cilantro and crushed Tomi chips.
  8. Serve immediately.

Note: You can add more monggo if you want more beans than meat. You can also soak the monggo beans for 2 hours before prepping to speed up the cooking time.

Monday, December 28, 2020

Sia Not a Fit for Personal Backups

In this post, I will describe my experience trying to use Sia as personal backup service. Sia is a decentralized cloud storage platform.  I heard about Sia back in late 2017 when just about everyone was talking about cryptocurrencies, altcoins, and blockchains.  It appears to still be active 3 years later, so I took that as a good sign.  Spoiler alert - I got everything working, but learned that Sia is not a good fit for a personal backup service.

Alternative to CrashPlan

Ever since CrashPlan changed their focus to enterprise users and raise their price to a minimum of $10/month, I have been looking for a lower-cost file backup alternative for my home computer.  I finally decided to give Sia a try. If it worked out, I could reduce my annual backup expense from $120 to just $5!

Before I get into my Sia experience, here is an overview of all the steps I will attempt:
  1. Read about Sia (30 minutes)
  2. Download Sia UI (5 minutes)
  3. Wait for blockchain syncing to complete (8 hours)
  4. Purchase Siacoin in Bittrex (30 minutes).  Note, if you don't already have an account with a crypto exchange that supports Siacoin, then this step might take up to 24 hours to get set up.
  5. Transfer Siacoin to Sia UI wallet (60 minutes)
  6. Download SiaSync (10 minutes)
  7. Sync files (3 hours)
  8. Verify ability to restore on a different computer (4 hours)

Sia Terminology

I did a little reading on Sia's website to get familiar with their terminology.  I am a Renter that will be uploading files to other computers owned by other people called Hosts.  For that privilege, I will be configuring an Allowance of Siacoin (SIA), which is how much money I'm willing to spend.

The Sia UI

My home computer is an Ubuntu 18.04 desktop.  I downloaded the SIA UI Linux application from their Getting Started page. Double clicking it didn't do anything.  I made it executable and then launched it from the command line:

chmod +x Sia-UI-v1.5.3.AppImage
./Sia-UI-v1.5.3.AppImage

This brought up the SIA UI.  It assigned me a Sia Seed which I saved as a secure LastPass note.   The app displayed a message saying it was syncing and I could see the Block Height continue to increase, but I didn't know what that meant.  I selected Rent from the menu and then Setup Allowance.  This launched a calculator where I plugged in my estimated initial usage of 0.1 TB (100 GB).  It said the target price was 1250 SC which is the cost of a TB per month.  I wasn't sure if that is the current market rate or some kind of bid that I will be placing, but I kept it as-is, and continued.  Next I was asked if I am sure I want to set an allowance of 250 SC to rent storage on Sia.  I confirmed and was then given an error message saying that I have to wait for Sia to finish syncing before I can set an allowance.  I actually tried this several times because at first it seemed like nothing happened.  Later I found out that all of these contracts were queuing up and would go into effect as soon as my SC arrived in my wallet.  I wish the Sia UI had shown me these pending contracts so I wouldn't have generated so many!  My Block Height had reached over 40,000 by this point, but there was no indication of how long I'd have to wait for syncing to complete.

Sia UI

The Big Wait

I found this support post Why does Sia take so long to sync? which explained that before getting started, Sia would have to download an entire copy of its blockchain (over 22 GB) which could take several hours to over a day!  They should really tell you this when you first open the UI.  I decided to leave this to finish syncing over night and come back in the morning.  According to SiaStats, the Block Height needed to get to 292,652.  Sure enough, it had completed syncing by the morning.  The Dashboard showed 292,652 Block Height, 9 Connected Peers, and 203 Active Hosts.

With the Sync completed, I selected Rent in the UI and tried to set up an Allowance. I received a message saying Allowance successfully updated.  However, nothing in the Rent or Wallet section updated, so I have a feeling nothing actually happened since I don't have any Siacoin yet.

Getting Siacoin

The next step was to obtain some Siacoin (SC) I could use to purchase a contract.  Luckily I already had a Bittrex account which is one of the exchanges where you can trade for Siacoin.  Siacoin was currently trading at 1 SC for 0.00000013 BTC.  I tried to buy 1,500 SC for 0.00019568 BTC ($5.30 USD) which I estimated would last me a whole year.  Bittrex warned me that the minimum trade was 0.0005 BTC.  So I increased to 4,500 SC for 0.00058704 BTC ($15.91 USD) and tried again.

Bittrex Limit Order of SC

Transferring Siacoin

Once the order went through, I had to transfer the SC out of Bittrex and into my Sia UI Wallet.  Within the Sia UI, I went to Wallet, then Receive, then Generate New Address.  I initiated a Withdrawal within Bittrex, and entered the wallet address that I just generated from Sia UI.  The withdrawal showed as Completed in Bittrex pretty quickly.  However, I had to wait about 7 minutes before it showed up in the Sia UI.  I was relieved it showed up, though, as cryptocurrency transfers generally make me nervous.  The transaction status showed as 0/6, and I had to wait another 10 minutes before transaction fully completed with status of 6/6.  I transferred 1,500 SC, but was charged a 0.1 SC transaction fee, so 1499.9 SC ended up in my Sia UI wallet.

Contracts

Looks like 50 Contracts got created and and 143.52 SC were allocated when I attempted to set up an Allowance several times earlier.  I still don't really understand Contracts well enough to know how many I should have.  For now I'm going to assume that I have more than what I need and move on.

Syncing Files

To set up file syncing between my desktop and the Sia network, I turned to Siasync.  As new files are created or removed from a source folder, it will add or remove them from the Sia network accordingly.  This replicates the behavior I had with CrashPlan and what we're all used to with services like Dropbox.  Following their instructions, I downloaded the Siasync binaries for the latest version, 1.0.1 beta 1 and made the file executable from the command line:

chmod +x Siasync-linux-amd64

I was hoping I could make a single folder containing symlinks to other folders I wanted to sync.  I tried it, but Siasync wasn't recognizing any symlinked folders.  To sync multiple folders as subfolders to a single backup folder on the Sia network, I used the following separate commands:

./Siasync-linux-amd64 -sync-only -size-only -subfolder backups/Desktop ~/Desktop
./Siasync-linux-amd64 -sync-only -size-only -subfolder backups/Music ~/Music
./Siasync-linux-amd64 -sync-only -size-only -subfolder backups/Pictures ~/Pictures
./Siasync-linux-amd64 -sync-only -size-only -debug -subfolder backups/Videos ~/Videos

This worked, and all my files got backed up on the Sia network!

While searching for solutions on syncing using symlinks, I came across this Sia Cloud Storage Extension for GNOME which promises to take the place of Siasync with support for symlinks that you can put in a synced ~/Sia folder.  I made a note to try that later. 

Sanity Check

As a last step, I wanted to check if I could access my files from another computer. To do this, I downloaded Sia on a Macbook Pro. To try to save some time, I copied the consensus.db file (all 22 GB of it) from my Ubuntu desktop (192.168.0.51) so Sia UI wouldn't have to download it again:

scp ken@192.168.0.51:.config/Sia-UI/sia/consensus/consensus.db ~/Library/Application Support/Sia-UI/sia/consensus/.

This only took a few minutes, but Sia UI was still taking hours to finish configuring itself.

While waiting, I checked back with the Sia UI on my Ubuntu desktop and saw that the file uploads appeared to be stuck.   The health of each file was still at 0% and the number of items uploading wasn't changing.  I read lots of Sia documentation, but I couldn't figure out if something was wrong or if I just had to wait longer.  I found that Sia had a Discord server, so I signed on there to try to get help from the community.  I posted about my problem in the #help channel, and a nice person named Covalent helped me out.  He asked me to show him the output of siac renter -v.  After seeing that he concluded that my allowance was way too small.  He also explained to me that each file would take up a minimum of 40 MB!  With over 35,000 files, I was going to have to pay for over 1.4 TB of data!  That would make my backups cost even more than I was paying for CrashPlan.  Sia docs mention this 40 MB atomic file size here, but I didn't see anything about this in the Getting Started docs.  They should really make this clear for people up front.  If I knew that going into it, I wouldn't have done any of this.

Final Thoughts

It's been a long 24 hours learning about Sia and getting it set up as a personal backup system. In the end, it just doesn't seem well-suited for this use case, at least not in an affordable way.  I might try zipping up my directories and storing them on Sia as fewer, but larger compressed files. If that proves to be too convenient, I'll be sticking with CrashPlan for the time being.



Sunday, September 06, 2020

Simplifying Custom Events for Google Analytics using Google Tag Manager

I am relatively new to using Google Tag Manager (GTM), and I am trying to figure out the best way to log Custom Events from a single page app built with React.  I want these events to register in Google Analytics (GA) which I have set up already in Google Tag Manager.  The kinds of events I'm planning to record are user account creation, email validation, user sign in, user sign out, and various other interactions within the application. It looks like there are various ways to trigger events based on form submissions using Google Tag Manager, but I thought it would just be simpler to manually "invoke" each event I want exactly where I want it via the GTM API.

Searching the web, this was the most useful tutorial I found: Google Tag Manager Custom Event Trigger Explained by Julius Fedorovicius.  I made a spreadsheet for my app to capture all the custom events I am interested in.  There were 26 of them.  As I followed the tutorial, I noticed the following things I would need to do:

  • Create and push various Variables into the GTM Data Layer to use them in my event labels and values.
  • Create a new GTM Trigger for each of the 26 custom events from my spreadsheet
  • Create a new GTM GA Tag and associate the corresponding trigger for each of the 26 custom events from my spreadsheet
This seemed like a lot of work and maintenance within GTM.  I wondered if there was an easier way.  Since it is possible to define the event's Category, Action, Label, and Value using variables from the Data Layer, I realized that should be able to handle all of my 26 events with just 1 new GTM Tag and Trigger along with a reusable set of custom Variables.  Here's how I set it up:

Step 1: Create Data Layer Variables for each possible GA Event field


Google Tag Manager Custom Data Layer Variables for Google Analytics Event













This will be used for all the possible event fields Category, Action, Label (optional), and Value (optional) to be captured from the Data Layer.

Step 2: Create a Custom Event Trigger


Google Tag Manager Custom Event Trigger















This is meant to be generic so it can be used for any Custom Event.

Step 3: Create a Custom Event Tag and Associate with Custom Event Trigger


Google Tag Manager Custom Event Google Analytics Tag





























This Google Analytics tag will be triggered by the Custom Events.  Each attribute of the GA tag (Category, Action, Label, and Value) should be configured to come from the corresponding Data Layer Variable that was created in Step 1.  This is what allows the same Trigger and Tag to be used for all Events.  That's the whole set up!

The list of Tags now only includes one Tag for Custom Events instead of one for each Custom Event.  The tag list should look something like this:

Google Tag Manager Tag List










Pushing Events to Google Tag Manager

Now within the application, Custom Events can be pushed to Google Tag Manager's Data Layer and the Trigger that was set up will push them into Google Analytics.  The code would look something like this:

<script>
 window.dataLayer = window.dataLayer || [];
 window.dataLayer.push({
 'event': 'Custom Event',
 'eventCategory': 'My Event Category',
 'eventAction': 'My Event Action',
 'eventLabel': 'My Event Label',
 'eventValue': 0
 });
</script>


Final Thoughts

Perhaps the downside of this approach is that it may be harder to adapt these events to other analytics tags I may use in the future.  Maybe that is why Julius Fedorovicius's post referenced above suggested creating a new Trigger and Tag for each individual event.  I was thinking about trying out Mixpanel next, so I will soon find out.  For all you Google Tag Manager and Google Analytics Experts out there, please let me know your thoughts.  

Monday, June 22, 2020

Dividing Money

I have found a few situations that require taking an amount of money and dividing it up as evenly as possible, to the nearest cent or whole dollar, such that the individual parts exactly add up to the original amount.

Here are a few examples of when I've needed to do this:

Example 1:

Apportioning an Operating Expense to Multiple Real Estate Properties

As a real estate investor that owns multiple properties, I sometimes have operating expenses that are not associated with any individual property.  Since the Schedule E tax form requires all expenses to be listed on a per-property basis, it is necessary to take the expense and divide it up across the properties.  As an example, let's say I spent $1025.95 on tax preparation and I have 7 properties.  I would split that expense as follows:

 Property Amount
 A $146.56
 B $146.56
 C $146.56
 D $146.56
 E $146.57
 F $146.57
 G $146.57
 Total: $1025.95

Notice that in this case I use a precision of cents.

Example 2:

Distributing Cash Tips at a Gig

As a band leader, at the end of a gig, I often need to collect the cash tips we received, total them up, and split them with the rest of my band.  For example, if my jazz trio earns a total of $113 in tips, I would pay each musician as follows:

 Musician Amount
 myself $37
 bass player $38
 drummer $38
 Total: $113

In this case, I use a precision of whole dollars since we typically don't receive any coins.

These are just 2 examples, but similar division logic can be used when friends need to split the bill at a group dinner and other similar situations and the amount of money cannot be split evenly.  It's not rocket science to make these calculations, but I do it often enough that I decided to make a simple web-based tool to do it for me.  The tool can be found at:


In this tool, simply enter an amount of money, how many parts you want to divide it into, and the precision (cents or whole dollars), and then click Divide to get the resulting amounts. Feel free to use it for all your money splitting needs!  And let me know what you think of it in the comments below.

Thursday, April 19, 2018

Digital Advertising Cryptoscape

Many companies are working on leveraging the blockchain to solve digital advertising industry problems.  I've been trying to keep track of who's doing what and how it all fits together. Inspired by the famous Display LUMAscape from LUMA Partners, I've come up with the following Digital Advertising Cryptoscape!

Digital Advertising Cryptoscape

Here's a quick summary of each entity shown above:

Transparancy

adChain

Open protocol on the public Ethereum blockchain that allows for the building of decentralized applications for the $175 billion digital advertising ecosystem. By MetaX. adToken (ADT) is a multi-purpose token with usage properties for voting, depositing and challenging entry into the adChain Registry.

Rebel AI

Blockchain-enabled ad security solution that protects publisher identity and advertiser spend, and prevents ads from ever appearing on an unauthorized site.

DSP's

HubDSP

Accepts BTSR (10% off) and other cryptocurrencies.

DMP's

Zohem

Decentralized user data exchange protocol to replace DMPs like BlueKai. Zohem’s Core comprises of a common data layer to which all publishers will be able to contribute data and get rewarded for the same with Zohem Data Tokens (ZDTs)

MadHive

Audience-Driven Data Solutions for OTT and AdvancedTV. Founding member of adledger.

Attribution

MediaChain

Mediachain is a blockchain data solution for connecting applications to media and information about it. Attribution Engine. The best image search engine for creators. Find free, high quality images that you can share and re-use.

Exchanges

AdEx

A decentralized ad exchange built on top of Ethereum smart contracts.

Exchain

Blockchain and programmatic advertising platform by EnvisionX. Formerly Bitcasts.

Kind Ads

A Decentralized Trust Protocol (the “Kind Ads Protocol”) will create an ecosystem for users, publishers, advertisers, and app partners. Currently focused on push notifications and developing a quality and reputation score for domains.  No fees will be charged on dollars spent.

NYIAX

The world's first exchange to trade advertising contracts. Developed in partnership with Nasdaq, NYIAX combines financial trading and advertising technology in one platform to enable publishers and advertisers to buy, sell, and re-trade premium advertising inventory. As the first and only trusted, transparent, future inventory marketplace, NYIAX allows both publishers and advertisers to increase ROI and reduce costs.

XCHNG

By Kochava. Through a smart contract IO, enables the related targeting and activation of audiences, and bolsters ad-spend efficiency and security. It will usher in a next-generation advertising system of record for all participants.

qChain

Facilitating branded content, sponsorship, and influencer marketing transactions between advertisers and digital publishers or content creators

Payments

Amino

Transparency-focused ad tech payment tech.

BitTeaser

Use coin BTSR as a form of payment when the bill needs to be paid for programmatic advertising worldwide.

Identity

Faktor

A blockchain based Identity Management platform for publishers, safely connecting people to brands and content.

Monetization

Brave Browser

A Chrome-based browser that blocks ads and uses Basic Attention Token (BAT) to pay users and publishers.

CoinHive

Allows publishers to mine Monero (XMR) in users' browsers.

JSECoin

A brand new coin specifically for publishers to mine in their users' browsers.

Consortiums

adLedger

Nonprofit research and development consortium charged with implementing global technical standards and solutions for the digital media and blockchain industries.

IAB Tech Lab Blockchain Working Group

Investigates the application of blockchain technology to address challenges in the digital advertising space and to develop standards and best practices for the utilization of blockchain technology.

Additions

If you are aware of any additional organizations using the blockchain for digital advertising that belong on this cryptoscape, please leave a comment, and I will update it.

Edits

2018-04-26 Added Kind Ads.

Tuesday, December 19, 2017

Los Angeles Roof TV Antenna for VHF/UHF

Cutting The Cord

This year I finally cut the cord and got rid of my DISH satellite TV service which saves me about $50 per month! I've had the service for many years just to get the basic local channels like CBS, ABC, NBC, and FOX.  My plan was to replace DISH with a digital antenna so I could get all of those channels for free.  In this post, I'll share the model of the antenna that worked for me here on the west side of Los Angeles.

Antennas

Finding the right antenna proved to be more difficult that I thought it would be.  I first started with an indoor VHF/UHF antenna, the NorthVu NV20 Pro AMPd, that I got from Tablo's website.  Tablo is an Over the Air (OTA) DVR company.  Long term, I was contemplating buying one of their DVR's so I figured it would be good to get an antenna they were familiar with.  With this antenna, I was able to get some UHF channels like CBS, but none of the VHF channels like FOX.  I thought that maybe an indoor antenna was not powerful enough for my neighborhood in Los Angeles which is Del Rey 90066.

I shopped on Amazon for a highly-rated outdoor roof antenna and purchased this 1byone 85 Miles VHF/UHF antenna. I borrowed a friend's ladder, got on my roof, mounted this antenna and connected it to the coax cable that was previously connected to my DISH satellite which DISH never came to retrieve. I also plugged in and connected the included power booster behind my TV.  Unfortunately, I got the same result: UHF channels came in perfectly and VHF channels did not work at all.  I have no idea why since the specs for this antenna clearly claim that both VHF and UHF should work.  I ended up returning this antenna to Amazon for a refund.

Next I started Googling for with terms like "missing VHF channels in Los Angeles" and found this web page called Best TV Antenna for Los Angeles, CA Digital TV Stations from an antenna vendor in NY called Denny's Antenna.  The middle of this page described my exact problem:
Note: Some Los Angeles area residents have reported problems receiving KABC 7.1 ABC, KTTV 11.1 FOX, KCOP 13.1 MYTV and KCAL 9.1 IND when using antennas other than the EZ HD or the HD Stacker. This is due to the VHF broadcast signal frequencies in use by these stations and the use of the improper antenna to receive VHF signal frequency. Many of today's antennas (do to smaller antenna size) will not receive VHF signals. The EZ HD and the HD Stacker are designed to provide excellent performance across the entire VHF/UHF frequency spectrum in use in the Los Angeles free to air broadcasting market.
So I immediately ordered their EZ HD antenna.  It arrived at my house in just a few days.  I mounted it on my roof, connected the coax cable, connected a ground wire that was also left over from the previous DISH satellite, and scanned for channels on my TV.  Amazingly, it worked!  I was able to receive all the local channels, both UHF and VHF.  I have no idea why this antenna worked so well.  To be honest, this one felt flimsy and cheaply made compared to the one I bought on Amazon.
Denny's EZ-HD - works in LA
Denny's EZ-HD - works in LA

Channel Guide

A list of local channels is easily available online, but I wanted one for my phone so I downloaded the app TV Listings by TV24.  I was amazed how many channels you can get for free over the air.  The TV Listings listings were pretty accurate.

DVR

I look forward to being able to watch local news once in a while or a live event like the Grammy's that is hard to find online.  The next thing I am going to look into is whether I want to purchase a DVR such as Tablo.  A lot of the shows I've been watching are on Hulu, Netflix, and Amazon to which I already subscribe.  It isn't clear yet whether the DVR is necessary.

Sunday, October 15, 2017

Chad Lefkowitz-Brown Solo Transcriptions

I am a huge fan of saxophonist Chad Lefkowitz-Brown.  I came across one of his videos on Instagram about a year ago and I've been following him ever since.

I recently purchased his book of 15 solo transcriptions by saxophonist and educator Ron Fix.  It's available in physical and digital form. It is fun to play through them and get some insight into how Chad thinks when he improvises.

Interestingly, this is the first transcription book I've ever seen that covers music solely from social media!  Every single one is freely available online on either Chad's YouTube or Instagram feed.

The digital version of the book comes with audio files you can play along to, but it doesn't include links to find each video online.  I combed through Instagram, YouTube, and Facebook to find each one.  That's what I want to share with you in this post so you can both watch and play along.  Happy practicing!

They are listed below in the order they appear in the book.

After you listen to these, be sure to check out more of  Chad LB's solos on AllSolos.com.

All The Things You Are

Instagram - November 9, 2016



Body And Soul

YouTube - December 8, 2015



Caravan

Instagram - September 27, 2016



Confirmation

Instagram - July 26, 2016



Driftin’

YouTube - February 26, 2014



For All We Know

YouTube - May 17, 2013


Get Lucky

YouTube - October 9, 2013



High High The Moon

Instagram - April 22, 2017



Melodic Cell Lines

Instagram - April 6, 2017

A post shared by Chad Lefkowitz-Brown (@chadlbsax) on


Nature Boy

YouTube - July 28, 2014



On The Sunny Side Of The Street

YouTube - February 16, 2015



Recorda Me

Instagram - August 24, 2016



Sandu

YouTube - July 15, 2013



Struttin’ With Some Barbecue

Facebook - August 4, 2016
Instagram - August 6, 2016



Take The A Train

YouTube - November 18, 2014



There Is No Greater Love

Instagram - November 16, 2016

Tuesday, September 26, 2017

JavaScript Crypto-Mining with CoinHive and JSECoin

In the past, it has been difficult to mine BitCoin (BTC) with JavaScript in a web browser due to massive amount of processing power necessary.  Lately, JavaScript mining solutions for other types of cryptocurrencies have come on the scene. 2 examples are CoinHive and JSECoin.

CoinHive


CoinHive
CoinHive awards miners in Monero (XMR), a crypto currency known for its privacy as compared to BitCoin (BTC). It current trades for about $94 USD per 1 XMR. Once your account reaches the minimum payout of 0.5 XMR (~$47), they will transfer the Monero to a wallet that you have to setup outside of a normal coin exchange.  From there, you can transfer it into an exchange wallet and then ultimately trade it for USD or BTC.  CoinHive can be used as an alternative monetization source to ads.  It can also be used as a CAPTCHA or gate where your user must mine some Monero before being allowed to enter a website. Note that CoinHive currently takes a 30% rev share from the Monero you mine.

Recently some websites have been in the news for deploying CoinHive without making their users aware of it. They have since pulled it down.  Here are some articles about it:

JSECoin

JSECoin
JSECoin describes itself as "cryptocurrency mined by webmasters built for everyone".  JSECoins are supposed to be worth approximately $1 USD right now each, but no one knows the real value until they do an ICO after which point they will be listed on an exchange. Their ICO is planned for Q2 of 2018.  Those who begin to mine JSECoin have no assurances that their rewards will be worth anything.


What the Heck


Since this is all so new and interesting, I have decided to learn more about JavaScript coin mining, and the best way to do that is to jump in and try it.  Therefore, I have installed CoinHive and JSECoin miner code on this blog!  Consider this a warning - visiting this blog may use some of your computer's CPU until you close the page.  I am curious to see what kind of a "CPM" I make to compare with the ad units I'm running.  If you have any experience with JavaScript miners, please comment below.

Tuesday, December 22, 2015

Ubuntu CUPS Driver for Google Cloud Print

On my Ubuntu desktop computer, printing to Google Cloud Print works great when printing from Chrome.  This screenshot shows how I can select my printer, the Brother MFC-J450DW, from the printers I have previously setup in Google Cloud Print.

Google Cloud Print Printer Selection Dialog Box
Google Cloud Print Printer Selection Dialog Box
The problem is being able to select my Google Cloud Print printer from any other printer selection dialog box in Ubuntu.  The answer is to setup a CUPS printer driver that knows how to print to your Google Cloud Print printer.

Fortunately, Niftiest Software has made such a CUPS driver available: CUPS Cloud Print.  According to their website,
CUPS Cloud Print is a Google Cloud Print driver for UNIX-like operating systems ( Linux, Mac OS X , BSDs etc ). It allows any application which prints via CUPS to print to Google Cloud Print directly.
CUPS Clount Print is very easy to install on Ubuntu.  You just add their Personal Package Archive (PPA), apt-get install cupscloudprint, and run the setup script, written in python.  The setup script will prompt you for your Google user account.  Then it generates a link which you visit in your browser.  This will grant access to CUPS Cloud Print at Google and give you an authorization code. Just copy/paste that code when prompted by the setup script, choose an optional prefix for your Google Cloud Print printer names for when they show up as CUPS printers, and you're done.  After this, your Google Cloud Print printers will show up in your Printers settings, and you can choose them from any Ubuntu Print dialog box.

Ubuntu Printer Settings Dialog Box
Ubuntu Printer Settings Dialog Box

Here you can see that my Google Cloud Print printer name was Brother_MFC-J450DW and I told the CUPS Cloud Print setup script to use the prefix GCP-.  The prefix makes it easy to distinguish the Google Cloud Print printers from other printers you may have installed.  As you can see, I don't have any other printer setup besides the Google Cloud Print printers.

It's nice to be able to print easily from anywhere within Ubuntu without ever having to install a proprietary printer driver.  Thanks to Google Cloud Print and Niftiest Software for making this capability freely available!

Monday, January 19, 2015

Send Large Files with Amazon S3 and Groovy


Sometimes you need to send a very large files to people. You could use your email or file sharing service of choice, but they have limits.  For example:

Google Mail - 25 MB limit
Google Drive - 100 GB limit
Dropbox - 2-16 GB limit

Even if your file is within the limit, you don't necessarily want to use those services each time, because it will add up, and eventually you'll run out of space in your account.

You could use services that specialize in sending large files. For example: Hightail, WeTransfer, DropSend, etc. But, you may not trust them with your files or just don't want to bother with creating additional accounts.

I came up with another solution that works well for developers like me that are familiar with using Amazon S3.  With a simple script (I wrote mine in Groovy), I can upload any file from my computer to Amazon S3 and then generate a pre-signed URL that gives access to the file for a certain period of time.  This URL can be IM'd or emailed to anyone so that they can download the file before the URL expires.

Here are the steps to use this script:
  1. Make sure you have an AWS account and a bucket setup in S3.
  2. Download the script from GitHub: UploadToS3AndGenerateSignedUrl.groovy
  3. Modify the global variables:
    • pathToFile
    • bucketName
    • expiresInHours
    • myAccessKeyID,
    • mySecretKey
  4. Run the script:
    • groovy UploadToS3AndGenerateSignedUrl.groovy
  5. Copy the URL that gets printed to stdout. It will look similar to this:
    • https://my-bucket-name.s3.amazonaws.com/myLargeFile.zip?AWSAccessKeyId=12E3AZEDFJQ6CMZW1HG5&Expires=1421887816&Signature=GFQ0LeR%2FtgWWGtXu3cJXspFtKNE%3D
  6. Send the URL to someone else in an email. They can click on it to download the file.
  7. Optionally, use the Amazon S3 Console to remove the file from S3 once the recipient(s) have downloaded the file so that you don't get charged to have it sitting there forever.

Sunday, December 07, 2014

Using a Brother MFC-J450DW All-In-One with Ubuntu

Are you thinking about buying a Brother MFC-J450DW Wireless Office All-In-One Printer/Scanner/Copier/Fax Machine and wondering if it will work with your Ubuntu computer? The answer is YES! Brother actually includes Linux on their Supported OS Page.  I was able to get things working on Ubuntu 14.04 LTS "Trusty Tahr".

+

Brother Software Installation


Driver Downloads

The CD provided with the printer contains Drivers, Utilities, and Users Manuals, but only for Windows and Macintosh computers.  To get the Linux Drivers, you must visit the MFC-J450DW Downloads Page.  Select Linux as the OS and Linux (deb) as the OS Version or go directly to this page.  Follow directions to download and install the Driver Install Tool.

From a terminal:

gunzip linux-brprinter-installer-*.*.*-*.gz
sudo su -
bash linux-brprinter-installer-*.*.*-* MFC-J450DW
Will you specify the DeviceURI? Y, 14 (Auto)

After all this, you should be able to see your new printer:

System Settings -> Printers -> MFCJ450DW

You should also be able to scan with the application Simple Scan which comes with Ubuntu.

No Brother Software Installation


If you would rather not install any software on your computer whatsoever, the MFC-J450DW makes this possible.  I actually prefer this because it makes it easy to print and scan to and from any device you might have including Macs and iOS devices.

Google Cloud Print

Another option is to setup Google Cloud Print which lets you print from any device via your Google Account.  Brother's Google Cloud Print Instruction Page just tells you to find the right manual for your model.  If you visit the Brother MFC-J450DW Manuals Page, you will see the Brother Google Cloud Print Guide Page which let's you download the actual Brother Google Cloud Print Guide [PDF].  To save time, just make sure you have a Google Account and then go directly to your printer's admin web interface which is accessible via a web browser at http://[PRINTER_IP_ADDRESS]/ where PRINTER_IP_ADDRESS is the address of your printer on the local network.  I was able to obtain this IP address by looking at my router's list of connected clients.  You can also find out via the printer's control panel by selecting Menu -> Network -> WLAN -> TCP/IP -> IP Address.

The printer's Google Cloud Print admin page, at http://[PRINTER_IP_ADDRESS]/net/net/gcp.html?pageid=1084, only let's you associate the printer with one Google account.  However Google let's you share the printer with other people very easily.

Scan to the Web

Another option for scanning is to use Brother Web Connect.  Instructions can be found at the Brother Web Connect Page which lets you download the Brother Web Connect Guide [PDF].  I found it very easy to setup Web Connect for Google Drive and Dropbox.  Other options available that I haven't tried yet are Picassa, Flickr, Facebook, Evernote, Onedrive, and Box.  After you get it setup, you simply use the printer's control panel with WEB -> [Service] -> [Configured Service].  After scanning, the file will show up in your Configured Service in a folder called From_BrotherDevice.  So easy!

Please comment if you have any problems or other tips for people trying to get the Brother MFC-J450DW (or similar printer) working with Ubuntu.