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 os | |
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler | |
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler): | |
def do_POST(self): | |
filename = os.path.basename(self.path) | |
file_length = int(self.headers['Content-Length']) | |
with open(filename, 'wb') as output_file: |
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
config = { //SAMPLE OBJECT - replace this with your data object | |
stroke: 2, //svg stroke value | |
opacity: 0.3, //0-1 | |
offsetX: 120, //px | |
offsetY: 80, | |
fontWeight: 400, //css font-weight | |
fontSize: 12, //in px | |
changePositive: '\u25B4', //unicode character for up arrow | |
changeNegative: '\u25BE', //unicode character for down arrow | |
colorBlue: '#1190A3', //all hex colors will automatically use the addColor dat gui function |
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
license: gpl-3.0 |
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
## Install Python3.9 interpreter on ubuntu 22.04 | |
On a terminal just do the following steps: | |
Install dependencies: | |
sudo apt install tar build-essential checkinstall libreadline-dev \ | |
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ | |
libbz2-dev openssl libffi-dev |
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
to generate example certs | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout host.key -out host.crt | |
run server: | |
chmod +x server.py | |
./server.py | |
test server: | |
openssl s_client -connect localhost:8888 |
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
/*! | |
* @license | |
* TradingView Lightweight Charts™ v4.1.2 | |
* Copyright (c) 2023 TradingView, Inc. | |
* Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0 | |
*/ | |
(function () { | |
'use strict'; | |
/** |
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
"""digicheck - create and verify signatures for files | |
Usage: | |
digicheck keys | |
digicheck public <keyfilename> | |
digicheck sign <filename> <keyfilename> | |
digicheck check <filename> <keyfilename> <signaturefilename> | |
digicheck (-h | --help) | |
digicheck --version |
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
[CONST_PARAM] | |
rtsp = 1 ; RTSPЭ�飬0���ر� 1������ |
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
// node.js get keypress | |
var stdin = process.stdin; | |
// without this, we would only get streams once enter is pressed | |
//stdin.setRawMode( true ); | |
// resume stdin in the parent process (node app won't quit all by itself | |
// unless an error or process.exit() happens) | |
stdin.resume(); | |
// i don't want binary, do you? |
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 asyncio | |
import logging | |
# XXX: REMOVE THIS LINE IN PRODUCTION! | |
logging.basicConfig(format='%(asctime)s %(lineno)d %(levelname)s:%(message)s', level=logging.DEBUG) | |
logger = logging.getLogger(__name__) | |
# Connected client records | |
clients = dict() | |
OlderNewer