Skip to content

Instantly share code, notes, and snippets.

View nix1947's full-sized avatar
:octocat:
Pro

Manoj Gautam nix1947

:octocat:
Pro
View GitHub Profile
@nix1947
nix1947 / index.html
Created July 10, 2018 02:43 — forked from IanSmith89/index.html
Materialize Cheatsheet
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Materialize It!</title>
// Google Material Icons
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
// Google Material CSS
@nix1947
nix1947 / ipv6gen.py
Created June 8, 2018 01:15 — forked from hatarist/ipv6gen.py
I'm a lazy ass who didn't think it's worth to bother with the standard ipaddress library
import random
import sys
from netaddr import IPNetwork, IPAddress
def generate_random_ipv6(subnet):
network = IPNetwork(subnet)
return str(IPAddress(random.randrange(network.first, network.last)))
@nix1947
nix1947 / Basic MultiValueField MultiWidget
Created February 28, 2018 10:52 — forked from elena/Basic MultiValueField MultiWidget
Super Basic Django MultiValueField / MutliWidget example
"""
An example of minimum requirements to make MultiValueField-MultiWidget for Django forms.
"""
import pickle
from django.http import HttpResponse
from django import forms
from django.template import Context, Template
from django.views.decorators.csrf import csrf_exempt
@nix1947
nix1947 / forms.py
Created February 20, 2018 07:23 — forked from neara/forms.py
Django Class Based Views and Inline Formset Example
from django.forms import ModelForm
from django.forms.models import inlineformset_factory
from models import Sponsor, Sponsorship
class SponsorForm(ModelForm):
class Meta:
model = Sponsor
@nix1947
nix1947 / meta-tags.md
Created January 31, 2018 07:47 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@nix1947
nix1947 / settings.py
Created October 15, 2017 07:08 — forked from palewire/settings.py
My current default Django LOGGING configuration
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
'null': {
'level':'DEBUG',