Nathan Friedly
  • Home
  • About
  • Portfolio
  • Tech blog

Tech Blog

Fixing USB-C charging on the PowKiddy V90 for $0.01

PowKiddy V90 The PowKiddy V90 is an awesome little Linux-powered handheld gaming device. It's reminiscent of a Game Boy Advance SP, and it is capable of emulating most GBA games, in addition to many other consoles including NES, SNES, Genesis, and even some PS1 games!

I love mine, but it's not without it's flaws. The Miyoo custom firmware fixes many of it's issues, but it's inability to charge from a standard USB Type-C ports is a hardware bug. So, it's time to break out the multimeter, soldering iron, and USB-C specification!

Continue reading...

Tagged hardware, howto, retro-handheld

Power measurements for the PowKiddy V90, RGB10 Max, Anbernic RG351P, and GPD Win Max

I used a Multifunctional USB Digital Tester to record the power draw of a few handheld gaming devices. I've previously posted a lot of this information in various threads on reddit, but I've decided to collect them here as the new canonical source.

Continue reading...

Tagged hardware, retro-handheld

KingSpec 1TB SSD review for GPD Win 2

KingSpec SSD stock photo The GPD Win 2 is a small computer designed for gaming on-the-go. It has an upgradeable 128GB M.2 2242 SATA SSD. I decided to upgrade to a larger drive.

Continue reading...

Tagged hardware, review

ITEAD Sonoff and Slampher Review

remote ITEAD studio is an electronics shop based in Shenzhen, China with the tagline "make innovation easier". They sell a variety of hobbyist-friendly prototyping hardware such as LCD displays and Arduino shields, and they do seem to be one of the more innovative players in the market.

ITEAD has an Indiegogo campaign in progress for their latest products, Sonoff and Slampher, and they sent me pre-release samples of each to review.

The two devices are fairly similar, they're both essentially smart power switches. Both can be remote controlled via the included remote and/or via a Android or iOS app, and both can be assigned a schedule through said app.

The only real difference is the connectors and amount of amperage the devices can handle: Sonoff is hard-wired via screw terminals, and can handle up to 10 amps whereas Slampher is intended for lightbulbs (see the "lamp" in the name?) with an E27 socket and can only handle < 2A.

Continue reading...

Tagged hardware, review

DIY ESP8266 ESP-01 Programing / Test board

ESP-01NodeMCU and other ESP8266 modules are starting to become very popular because they offer an embedded development platform with a CPU+RAM+Storage+WiFi all in one for (considerably) less than the price of an Arduino. There are a number of breadboard-friendly modules with all pins exposed (and more coming soon.)

However, this post is about the breadboard-unfriendly ESP-01 module. It only has two GPIO pins (four if you include the TX & RX pins), but it's smaller and most importantly, cheaper.

Continue reading...

Tagged Arduino, hardware, ESP8266

Using an Arduino and an IR Shield to connect a TV and Sound Bar

Arduino Uno and IR Shield assembled "Snatching defeat from the jaws of victory." That summarizes Samsung's implementation of HDMI CEC ("Anynet+") in their "Smart" TVs - everything works except the power button.

However, with help from an Arduino and an IR Shield, I was able to add in the missing parts and make things work properly.

Continue reading...

Tagged Arduino, hardware, IR

Automatically removing spamers from the WordPress Coment Notifier Plugin's Database

Beach There’s an awesome WordPress plugin called Comment Notifier – what it does is add that check box at the bottom of the comments section. If you leave it checked when you add a comment, then it will automatically email you with anyone ease’s comments in the future.

However, it has a slight problem with spam. When spammers leave comments, my combination of Akismet and NoSpamNX do a pretty good job of keeping spam comments of of the site, but not before their (usually fake) email gets added to the Comment Notifier database.

Recently, I realized that my server was trying to send out several hundred failing emails any time someone left a comment. I shot a short feature request (and a small donation) to the Comment Notifier plugin’s author, but then decided that this was one I could take on myself. Here’s how I did it:

Continue reading...

Tagged antispam, howto, MySQL, WordPress

Automatically unit testing client-side JavaScript with Jasmine and Node.js

jasmine_logo At Sociable Labs, we have hundreds JavaScript unit tests that run on every checkin. They output a JUnit-compatible report that Bamboo can use to track stats and email us if anything failed. Here’s how we do it.

Continue reading...

Tagged howto, jasmine, javascript, node.js, testing

How to make Apache Ant tasks run in a default directory

Apache takeoffI often open a new tab in my Terminal to run an Ant task, and often as not I forget to cd into the correct directory first and so I am greeted with this error:

$ ant compile
Buildfile: build.xml does not exist!
Build failed

On my system, there’s only one main project that uses ant, so I almost always intend for ant tasks to be run against that project’s build.xml. So, I created a function that makes ant tasks “just work” no matter what directory I am in.

Continue reading...

Tagged ant, apache, bash, howto, productivity, shell

How to get your apps ready for Facebook's OAuth 2.0 upgrade

I just finished a writeup on the necessary JS changes to support Facebook's OAuth 2.0 upgrade, and then Hilary did a followup post on the server-side.

The upgrade enabled right now, but it gets forced out on October 1st. These two posts should give you all you need to know to get your site ready for Facebook's upgrade:

Continue reading...

Tagged facebook, howto, javascript, oauth2.0, php

How Facebook sets and uses cross-domain cookies

I’ve seen a lot of confusion about this lately, so I thought I’d make a quick writeup to explain how facebook does it. (I’ll also give a quick tip on how you can do it yourself.)

What Facebook Does

Facebook is in a unique position compared to many developers looking to set cross domain cookies: The user visits both facebook.com and the other website.

Continue reading...

Tagged cookie, cross-domain, facebook, howto, javascript

JavaScript library and .swf for cross-domain flash cookies

I’m working on a project that has a legitimate (non-spammy) reason to need cross-domain cookies, and we settled on flash as a good way to accomplish this.

However, I was surprisingly unable to find any complete library or how-to guide for connecting flash cookies to javascript. So I dusted off my flash skills and built one, and and now you get to enjoy the fruit of my labor:

Continue reading...

Tagged actionscript 3.0, cookie, cross-domain, externalinterface, flash, flashcookie, javascript, sharedobject, swf

How to build a spam-free contact form without captchas

data_security_3Most anti-spam methods used by websites today are annoying at best. They use impossible-to-read captcha images, or they make users jump through some kind of hoop to get the email address instead of just clicking on it. This can mean lost sales and opportunities for you, because each hurdle turns away more users.

This article looks at how to use some simple HTML, CSS, & Javascript to protect your private information without making your guests jump through hoops.

Continue reading...

Tagged antispam, howto, javascript, php, security, ux

Advanced Javascript: Logical Operators and truthy / falsy

Nearly every website on the internet uses javascript in some form or fashion. Yet very few people, even those who write it and teach it, have a clear understanding of how javascript works!

Logical Operators are a core part of the language. We’re going to look at what logical operators are, what “truthy” and “falsy” mean, and how to use this to write cleaner, faster and more optimized javascript.

Continue reading...

Tagged javascript, optimization

How to use XSLT to style an RSS feed

Take this!XSLT is a fairly well-supported technology. It allows you to take any XML file – including RSS – and transform it into a styled HTML document. It’s kind of like CSS on steroids.

Unfortunately, most browsers think they know better and go off and do their own thing on RSS feeds.

We’re going to look at how and which browsers can be brought into line, and how to use XSLT to improve the look of your RSS feed in those browsers.

Continue reading...

Tagged css, javascript, php, rss, xml, xslt

How AJAX Security and Twitter callbacks work

The twitter callback feature is nice – it makes it extremely easy to to add a twitter feed to a page. But to get the most benefit out of it, you really need to understand what it’s doing.

We’re going to look at how AJAX security works, specifically the Same Origin Policy, how Twitter gets around it, and the type of callback that twitter uses.

Note: the callback that twitter uses is entirely different from callback in the sense of passing a javascript function around as a variable. We’ll look at that in a future article.

Continue reading...

Tagged ajax, javascript, json, security, twitter

Advanced Javascript: Objects, Arrays, and Array-Like objects

Javascript objects and arrays are both incredibly useful. They're also incredibly easy to confuse with each other. Mix in a few objects that look like arrays and you’ve got a recipe for confusion!

We're going to see what the differences between objects and arrays are, how to work with some of the common array-like objects, and how to get the most performance out of each.

Continue reading...

Tagged javascript

Search Engine Optimization and Marketing (SEO & SEM)

King Philip III of SpainSEO and SEM is all the rage these days. You can do all kinds of modifications to your website, but the age-old adage still holds true:

Content is king.

Unique, interesting, well-written content is what makes your site stand out. Well written content will have key words, but won’t feel spammy. It will naturally attract high quality links back to it.

That said, there are several factors you can keep in mind while writing your content…

Continue reading...

Tagged marketing, sem, seo

Why some users can't see a https website

lock_smallRecently a client of mine had me pulling my hair out trying to figure out why some users couldn’t see the the secure https sections of their website.

As it turned out, the server had been upgraded to TLS only for PCI-compliance, and some users had TLS disabled.

This article goes in to the how, they why, and the solution to fix https websites that aren’t showing up for some users.

Continue reading...

Tagged bugfix, https, security, ssl, tls

How to fix Cart 32 "Bad file name or number Error Number = 52"

cart32-errorOne of our Cart32 websites started having a problem recently where it would work great all the way until the last page of the checkout process, where it would give the error “Bad file name or number Error Number = 52″.

Even worse, it charged the customers credit card each time, so a persistent customer could wind up with multiple charges which you would need to undo!

Continue reading...

Tagged bugfix, cart32

Contact Nathan

  • nathan @ (this website)

Site Map

  • Home
  • About
  • Portfolio
  • Tech blog

Website by Nathan Friedly

Creative Commons License Content licensed under Creative Commons Attribution.

Source code available on Github under a MIT License

Built with DocPad, Bootstrap, and Node.js.