Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| import hmac | |
| import simplejson as json | |
| from base64 import urlsafe_b64decode | |
| from hashlib import sha256 | |
| def parse_signed_request(signed_request, secret): | |
| [encoded_sig, payload] = signed_request.split('.') | |
| # decode data |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
| from fabric_openvz import guests, vz_run | |
| @guests('uhura', 'obiwan') | |
| def uname_a(guest): | |
| """ | |
| Show uname -a on given guests | |
| """ | |
| vz_run(guest, 'uname -a') | |
| @guests('uhura', 'obiwan') |
| *.py[co] | |
| *.egg-info/ | |
| /MANIFEST | |
| /build/ | |
| /dist/ |