Skip to content

Instantly share code, notes, and snippets.

View webbyfox's full-sized avatar
🏠
/var/www

Rizwan webbyfox

🏠
/var/www
View GitHub Profile
@webbyfox
webbyfox / simple_websocket_client.html
Created June 1, 2018 14:34 — forked from geoffb/simple_websocket_client.html
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
from cms.app_base import CMSAppConfig
from .models import TestModel1, TestModel2
class TestModel1Config():
fields = ['field1', 'field2']
model = TestModel1
# any other configuration including admin listing can go here
import requests
import re
# Framework to detect
FRAMEWORKS = ['jquery', 'angular', 'react', 'vue', 'bootstrap']
def get_version(str):
version_pattern = "v([\d.]*)"
version = re.findall(version_pattern, str)