This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from aiohttp import web | |
| def rpc_method(method): | |
| method.is_rpc_method = True | |
| return method | |
| def raise_method_not_found(method): | |
| raise RpcError('Method `{}` not found'.format(method), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| import hmac | |
| import string | |
| from hashlib import sha256 | |
| UTF8 = 'utf-8' | |
| MESSAGE = '1457369891.672671' | |
| SECRET_KEY = 'my secret key' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| class Employee(object): | |
| def __init__(self, first_name, last_name, speciality): | |
| self._first_name = first_name | |
| self._last_name = last_name | |
| self._speciality = speciality | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($, window) { | |
| /** | |
| * Provides a namespace for BugKick classes | |
| */ | |
| var _ = window[baseNameSpace] = window[baseNameSpace] || {}; | |
| _.jQuery_URL = 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' | |
| /** | |
| * | |
| * @param namespace {@string} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Family { | |
| Man husband; | |
| Woman wife; | |
| ChildrenCollection babies; | |
| public Family(Man husband, Woman wife) { | |
| this.husband = husband; | |
| this.wife = wife; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var contact = { | |
| menu: null, | |
| state: null, | |
| access: null, | |
| fill: function() { | |
| this.menu = 1; // $("div#sm").innerhtml(); | |
| this.state = 2; | |
| this.access = 3; | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (var i = 0, l = e.dataTransfer.files.length; i < l; i++) { | |
| var file = e.dataTransfer.files[i], | |
| xhr = new XMLHttpRequest; | |
| xhr.open('post', 'upload.php', true); | |
| xhr.onreadystatechange = function () { | |
| if (this.readyState != 4) { | |
| return; | |
| } | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| localStorage.setItem('removeAd', '(function(){var e=document.getElementsByTagName("div");for(var d=0,c=e.length;c>d++;){if(e[d]&&e[d].className=="l-body-branding"){var b=e[d].getElementsByTagName("a");if(b.length>0){e[d].removeChild(b[0]);e[d].style.backgroundImage="none";break}}}})();'); | |
| eval(localStorage.removeAd); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Open in new window</title> | |
| <script type="text/javascript"> | |
| if(!window.opener) { | |
| window.open(window.location.href, '_blank'); | |
| } | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ticketMetaData = { | |
| 51: { | |
| users: [/* user objects for ticket #51 */], | |
| labels: [/* label objects for ticket #51 */] | |
| }, | |
| 52: { | |
| users: [/* user objects for ticket #52 */], | |
| labels: [/* label objects for ticket #52 */] | |
| }/*, etc... */ | |
| } |