- Connect to the VPN
- Start an SSH tunnel through
battlezone.int
ssh -ND 9999 battlezone.int
- Update your proxy settings to connect through this tunnel, like so:
| def linregress(X, Y): | |
| """ | |
| Summary | |
| Linear regression of y = ax + b | |
| Usage | |
| real, real, real = linreg(list, list) | |
| Returns coefficients to the regression line "y=ax+b" from x[] and y[], and R^2 Value | |
| """ | |
| if len(X) != len(Y): | |
| raise ValueError('unequal length') |
| #!/usr/bin/env python | |
| """ | |
| Slugify input from STDIN to STDOUT. | |
| Usage: | |
| $ slugify.py | |
| one two three four five | |
| ctrl+D |
| #!/usr/bin/env python | |
| """ | |
| Example of gevent.with_timeout. Half the go_get calls will timeout. | |
| """ | |
| from gevent import monkey | |
| monkey.patch_all() |
| #!/usr/bin/env python | |
| import base64 | |
| from Crypto import Random | |
| from Crypto.Cipher import AES | |
| BS = 16 | |
| pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
| unpad = lambda s : s[0:-ord(s[-1])] |
| javascript: (function(){window.docCookies={getItem:function(a){return decodeURIComponent(document.cookie.replace(RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(a,b,c,e,f,g){if(!a||/^(?:expires|max\-age|path|domain|secure)$/i.test(a))return!1;var d="";if(c)switch(c.constructor){case Number:d=Infinity===c?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+c;break;case String:d="; expires="+c;break;case Date:d="; expires="+c.toUTCString()}document.cookie=encodeURIComponent(a)+"="+encodeURIComponent(b)+d+(f?"; domain="+f:"")+(e?"; path="+e:"")+(g?"; secure":"");return!0},removeItem:function(a,b,c){if(!a||!this.hasItem(a))return!1;document.cookie=encodeURIComponent(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(c?"; domain="+c:"")+(b?"; path="+b:"");return!0},hasItem:function(a){return RegExp("(?:^|;\\s*)"+encodeURIComponent(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var a=do |
| from random import shuffle | |
| def picktop2(*args): | |
| x, y = None, None | |
| for i in args: | |
| if i > x and i > y: | |
| y = x | |
| x = i | |
| elif i > x: |
| #!/bin/bash | |
| # Default port to serve on is 8800, to serve on another port, e.g. 3319: | |
| # serve.sh 3319 | |
| port=${1-8800} | |
| python -m SimpleHTTPServer $port |