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: