Skip to content

Instantly share code, notes, and snippets.

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

Rizwan webbyfox

🏠
/var/www
View GitHub Profile
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)
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
@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>
@webbyfox
webbyfox / gist:3b50aa85a8eeccc86e696efbad39f318
Last active January 1, 2018 21:10 — forked from ankitnetwork18/gist:4509792
mysql: dump of indian cities and states
-- Postgres SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `stgwordpress`
--
@webbyfox
webbyfox / aspnet-mvc.gitignore
Created October 11, 2017 19:47 — forked from indyfromoz/aspnet-mvc.gitignore
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from . import views
urlpatterns = [
url(
regex=r'^$',
Environment:
Request Method: GET
Request URL: http://localhost:8000/matrimonial/~imageupload/
Django Version: 1.10.5
Python Version: 3.6.0
Installed Applications:
('django.contrib.auth',
import csv
import calendar
from datetime import datetime
current = datetime.now()
filename = str(current.strftime('%m%Y')) + str('.csv')