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
{ | |
"name": "OnlyFans", | |
"short_name": "OnlyFans", | |
"icons": [ | |
{ | |
"src": "android-chrome-36x36.png", | |
"sizes": "36x36", | |
"type": "image/png" | |
}, | |
{ |
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
let wib_time = "Nov 25, 2023, 01:05:02 GMT+7"; | |
let now = new Date(2023, 11, 25, 1, 5, 2); // localtime | |
let date_options = {timeZone:"Asia/Jakarta", hour12: false, dateStyle:"medium", timeStyle:"long"}; | |
let wib_time = now.toLocaleString("en-US", date_options); // convert to UTC string | |
let wib_date = new Date(wib_time); // convert to UTC | |
const event = new Date(wib_time); | |
console.log(event.toUTCString()); |
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
REM | |
REM Copy this file to the ROOT FOLDER of python virtual environment | |
REM === by sefgit | |
REM | |
@set "VIRTUAL_ENV=%cd%" | |
@if defined _OLD_VIRTUAL_PROMPT ( | |
@set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | |
) else ( | |
@if not defined PROMPT ( |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<title>Socket.IO chat</title> | |
<style> | |
#messages { list-style-type: none; margin: 0; padding: 0; } | |
#messages > li { padding: 0.5rem 1rem; } | |
#messages > li:nth-child(odd) { background: #efefef; } | |
</style> |
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 st_socketio import sio, st_socketio | |
import streamlit as st | |
@sio.on('chat') | |
async def chat_event(sid, data, auth): | |
print('chat ', sid, data, auth) | |
await sio.emit('chat', data[::-1], sid); | |
return "OK", sid | |
@sio.event |
OlderNewer