Skip to content

Instantly share code, notes, and snippets.

@wzr1337
Last active August 29, 2015 14:00
Show Gist options
  • Save wzr1337/76112b771bfd9d08b57c to your computer and use it in GitHub Desktop.
Save wzr1337/76112b771bfd9d08b57c to your computer and use it in GitHub Desktop.
copy the following to your sublime console (show -> console), replace PROXY:PORT with your settings
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler({"http":"http://PROXY:PORT"})) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
@iusenix
Copy link

iusenix commented May 27, 2014

thanks for your help, Patrick.
i fixed my blog post.
http://binaryhack.org/install-package-control-on-sublime-text-3-with-proxy-setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment