This file contains 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 json | |
from awsgi2 import run, build_context, THeaders, TRequestReader, TSendHeaders, TResponse | |
async def app(headers: THeaders, | |
request: TRequestReader, | |
send_headers: TSendHeaders) -> TResponse: | |
if headers[':method'] not in ('GET', 'POST'): | |
send_headers({ |
This file contains 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
<pre id='hoge'></pre> | |
<input id='foobar' /> | |
<button id='send'>send</button> | |
<script> | |
const hoge = document.getElementById('hoge'); | |
const foobar = document.getElementById('foobar'); | |
const send = document.getElementById('send'); | |
let target; | |
if (window.opener) { |
This file contains 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 inspect | |
class AutoInit(type): | |
def __call__(self, *args, **kwargs): | |
sig = inspect.signature(self.__init__) | |
data = { | |
key: parameter.value for key, parameter in sig.parameters.items() | |
if parameter.default is not parameter.empty | |
} |
This file contains 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
'use strict'; | |
/* | |
A minimal "template" system. Just some wrappers around createTextNode and | |
createElement. | |
Usage: | |
E('div', {'class': 'foo'}, [ | |
E('span', {'style': 'color:red;'}, [T('Error')]) | |
]); |
This file contains 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
'use strict'; | |
/* | |
A minimal "template" system. Just some wrappers around createTextNode and | |
createElement. | |
Usage: | |
E('div', {'class': 'foo'}, [ | |
E('span', {'style': 'color:red;'}, [T('Error')]) | |
]); |
This file contains 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
void segfault() | |
{ | |
*(int*)0=0; | |
} |
This file contains 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 sys | |
import re | |
SPLITTER = re.compile('\s') | |
TOKENS = [ | |
'var', | |
'=', | |
';', |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDukEjh3hsCAmBWCdAUZyg8vjRBFbqFMAM0/hUTIEvK1RY0IBAnRGYLloMKxNvtXgZbp9haotFz1DkVzSfsXjwKm/soolB2/JUgIgsSMUfWipukAkAoZs2MCDILRm6YbtTFtpId0ZEVfbgbUBrjOiE13I01TzS8enpHiv6ag6yqj8x/5Xcstl3e0LkaxuWoTnXl4Dgqi7Yb60CCsql76gXHOzkM0ub8iJhncttxI2M2VF5foy+tRebk3tkkoHVlPOYka33UtW9XjuyupvExtf5h76NdrONoMOr25GwXs+6UuLIBRtwR5YRo5qiy4WTBvQ0wOwai849EIO+kAH3NJEgh [email protected] |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrV6ltrDFKmGdgc1H8vKZTHuBO7H4cpQJleNuTvfG1I1hFD54EnkJbA1O5zzNmGVEOzlF2E/+mCQYm12MFtEf8HTomU7XivSWv207pxi8jR2JteGmKLkx2xN4MbSXjo48WLUXu9GcWaLbVeC4UBPY4R1ThEk9LQEIU79BwqsMtAP306tQhsGf1mZTeCuy53687o20Rdw5UxS4jgya+YQUaRKsFP9RTGORb/fX/AUVbEbe+SEQ8wxsKpn2bnvWSmc1KN3ShuB4J1sDO5QdsVYAoCv9hwwq9/jti5t2XfuNY53/xNvCCougGp5jL74wzVyi3707fr9Gor06Q8rAaIvOF jonas@jonas-ubuntu |