Created
November 25, 2013 00:13
-
-
Save hitode909/7634349 to your computer and use it in GitHub Desktop.
接続中のWiFiのSSIDからインターネットにチェックインするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# 接続中のWiFiのSSIDからインターネットにチェックインするやつ | |
ssid = `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I`.split(/\n/).find{|line| line =~ /\bSSID/ }.scan(/SSID: (.+)$/).flatten.first | |
system "open 'http://t.heinter.net/#{ ssid }'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment