Skip to content

Instantly share code, notes, and snippets.

@cwittern
Created November 23, 2015 05:27
Show Gist options
  • Save cwittern/accd230f53049b0c1f62 to your computer and use it in GitHub Desktop.
Save cwittern/accd230f53049b0c1f62 to your computer and use it in GitHub Desktop.
;; this file sets the proxy as needed for the network in the zinbun in kyoto
;; try to set proxy
(setq ssid (if (eq window-system 'w32)
(shell-command-to-string "netsh wlan show interface | find /i \" SSID\"")
(shell-command-to-string "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'")))
(ignore-errors
(if (string-match "WaveLAN" ssid)
(setq url-proxy-services '(("no_proxy" . "localhost")
("http" . "proxy.kuins.net:8080")))
(setq url-proxy-services nil))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment