Skip to content

Instantly share code, notes, and snippets.

View theskumar's full-sized avatar

Saurabh Kumar theskumar

View GitHub Profile
<W>2016-12-24 09:07:13.376 Initializing settings from /etc/mumble-server.ini (basepath /etc)
<W>2016-12-24 09:07:13.456 Binding to address 205.147.98.91
<W>2016-12-24 09:07:13.457 Meta: TLS cipher preference is "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:AES256-SHA:AES128-SHA"
<W>2016-12-24 09:07:13.457 OpenSSL: OpenSSL 1.0.1f 6 Jan 2014
<W>2016-12-24 09:07:13.490 ServerDB: Opened SQLite database /var/lib/mumble-server/mumble-server.sqlite
<W>2016-12-24 09:07:13.497 DBus registration succeeded
<W>2016-12-24 09:07:13.498 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running
<W>2016-12-24 09:07:13.531 Murmur 1.2.17 (1.2.17-1~ppa1~trusty1) running on X11: Ubuntu 14.04.5 LTS: Booting servers
<W>2016-12-24 09:07:13.535 1 => Server listening on 205.147.98.91:64738
<W>2016-12-24 09:07:13.535 1 => Failed to set IPV6_RECVPKTINFO for 205.147.98.91:64738
# -*- coding: utf-8 -*-
"""
Creates a S3 bucket and displays the access key and scret that
will have access only to the created bucket.
Setup:
$ pip install boto3
Add AWS credentials which has create bucket and IAM create permission in environment
@theskumar
theskumar / 2015-07-10_Freenode_pyconindia.txt
Last active August 29, 2015 14:24
IRC logs for PyconIndia Meeting on 10th July 2015
19:00 Topic: Welcome to #pyconindia | This channel is for planning meetings of Pycon India (http://in.pycon.org/) |
19:00 satyag set the topic at: 12-Sep-2014 10:00 am
18:12 rangzen_: Hey Everyone..
18:54 kracekumar: hi
19:00 zz_theskumar is now known as theskumar
19:00 Mode: +cnt
19:00 Created at: 07-Jun-2012 1:33 pm
19:00 kracekumar: Hi all
19:01 kracekumar: We will wait for 5 minutes and get started
19:02 zz_satyag is now known as satyag
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
# Standard Library
import uuid
# Third Party Stuff
from django.db import models
from django_extensions.db.models import TimeStampedModel
@theskumar
theskumar / restricted_usernames.py
Created April 9, 2015 06:48
Restricted usernames
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
'''
List of reserved usernames (pre-defined list of special banned and reserved keywords in names,
such as "root", "www", "admin"). Useful when creating public systems, where users can choose
a login name or a sub-domain name.
__References:__
1. http://www.bannedwordlist.com/
2. http://blog.postbit.com/reserved-username-list.html
@theskumar
theskumar / app.py
Created November 17, 2014 06:47
Database diagram using sqlalchemy
# -*- coding: utf-8 -*-
''' Generates database schema graph from a relational database.
Usages:
Add database configuation in this file and then
python app.py
Note: You must have your latest database schema in the database
engine you are running against.
'''
from __future__ import unicode_literals, absolute_import
@theskumar
theskumar / Readme.md
Last active April 26, 2017 00:39
Sublime Configuration
@theskumar
theskumar / models.py
Created September 17, 2014 05:17
Django Currency Field (put this in 'myutils' module)
from django.db import models
from decimal import Decimal
try:
from south.modelsinspector import add_introspection_rules
except ImportError:
SOUTH = False
else:
SOUTH = True
@theskumar
theskumar / import_from_string.py
Created September 3, 2014 06:52
Django: Attempt to import a class from a string representation.
def import_from_string(val):
"""
Attempt to import a class from a string representation.
From: https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/settings.py
"""
try:
# Nod to tastypie's use of importlib.
parts = val.split('.')
module_path, class_name = '.'.join(parts[:-1]), parts[-1]
@theskumar
theskumar / message_logger.py
Last active August 29, 2015 14:04
An independent logger class in python
import time
class MessageLogger:
"""
An independent logger class (because separation is a good thing).
"""
def __init__(self, file):
self.file = file