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
@hatarist
hatarist / ipv6gen.py
Created May 2, 2018 13:11
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)))
@IanSmith89
IanSmith89 / index.html
Last active October 28, 2019 16:10
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
@aparakian
aparakian / django_select2.js
Created March 9, 2016 01:55
select2 integration
(function ($) {
$(function () {
$('.django-select2').select2({
placeholder: "Search for an audience",
ajax: {
data: function (params) {
return {
search: params.term
};
},
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@neara
neara / forms.py
Last active April 17, 2024 19:54
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
@elena
elena / Basic MultiValueField MultiWidget
Created October 19, 2012 01:25
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
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
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">