Friday, February 15, 2019

Jackson ObjectMapper: Unexpected character: was expecting double-quote to start field name

If you are running into the following error message, you need to configure your ObjectMapper to allow for unquoted field names. You can accomplish this in a single line:

mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);

Here's a full example of the code:

import org.codehaus.jackson.JsonParser;

public class Example {
    public static void main(String[] args) {
       ObjectMapper mapper = new ObjectMapper();
       mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);

Monday, December 5, 2016

M-Audio Keystation 32 Mini not recognized (Windows 10 x64)

If you're getting this error with using the Keystation 32 Mini,

Code 43Windows has stopped this device because it has reported problems. (Code 43)

Try plugging it into a USB2.0 port. I found that on USB3.0 ports, the Keystation couldn't be recognized.

Saturday, March 26, 2016

Download MP3 button for Youtube

Ever wonder how to get those extra buttons on YouTube pages to quickly download the mp3 or video? Read below to find out how!

These extra features are not YouTube settings but rather scrips created by users. To use them, you first need to get the chrome extension TamperMonkey. From there, you can add scripts to run on specific domains.

1. Get the chrome extension TamperMonkey.

2. Click "Install this script" on the script pages below:

(1) Download Video as Mp4
(2) MP3 Download button


Bypass YouTube Age Verification


Wednesday, January 13, 2016

[MAC] Free WiFi Hack at O'Hare Airport

Here's a trick to get free wifi at O'Hare if you don't mind reconnecting every 30 minutes. This method spoofs the ID (mac address) that the limited free wifi service uses to identify you as a user. By changing your ID every 30 minutes, it appears to the wifi that you're a new user, so you can continue to use the free wifi.

Use this trick *after* your first free session. Reuse as many times as needed.

Windows, Android, iPhone:
Follow the instructions here for spoofing your MAC address:


1. Open up Terminal

2. Copy and paste the following into Terminal:
ifconfig en0 | grep ether
3. You should see a bunch of letters and numbers like this: a0:af:8b:00:00:00. This is your current mac address. 

4. Copy and paste the following:
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/./0/2; s/.$//
5. This will generate the new ID for you to use. Now copy and paste the following:
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
6. Now update your ID by putting it in the command below:
sudo ifconfig en0 ether THE_GENERATED_CODE_FROM_STEP_4
7. Finally, run this command.
networksetup -detectnewhardware
8. Connect to the wifi network and open up your browser in Incognito mode. You can choose the free access again!


Tuesday, January 5, 2016

How to fix CORS preflight issues in local grunt app w/ self-signed SSL cert

After many hours of headbanging, I finally succeeded in making xhr requests between my local webapp running via grunt serve and my secure ASP.NET ServiceStack application on a self-signed certificate.

I tried to use the chrome trick of --disable-web-security on a shortcut of chrome, and using the Allow-Control-Allow-Origin: * plugin, but still I was running into errors like

  • Response for preflight has invalid HTTP status code 404
  • The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
  • Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access. 
I failed in trying to add CORS support to the server (which was okay-- we only want to bypass it for local testing).

With all these methods failing, I looked at the next logical progression: adding a proxy to the gruntfile to talk to the server. So I got my hands on the latest version of grunt-connect-proxy, followed their instructions for setting up, but I was still receiving issues. My requests would timeout at the proxy with the following error: Proxy error: ECONNRESET.

I finally found some others with the same problem in one of grunt-connect-proxy's github issues. The solution was to downgrade the version of grunt-connect-proxy. Low and behold, it works! My apps are talking to each other!

2. Install grunt-connect-proxy 0.1.10 
npm install grunt-connect-proxy@0.1.10

Here is the snippet of my gruntfile:

Monday, January 4, 2016

Convert font-awesome and glyphicons into exportable pngs

Check out this awesome site for converting icons into images!

Sunday, January 3, 2016

Update Website Footer automatically

Here is a super simple method for never having to update your footer again:

<script type="text/javascript">
    document.write(new Date().getFullYear());

More at: