Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created November 25, 2013 00:13
Show Gist options
  • Save hitode909/7634349 to your computer and use it in GitHub Desktop.
Save hitode909/7634349 to your computer and use it in GitHub Desktop.
接続中のWiFiのSSIDからインターネットにチェックインするやつ
#! /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