Skip to content

Instantly share code, notes, and snippets.

View dufferzafar's full-sized avatar

Shadab Zafar dufferzafar

View GitHub Profile
@dufferzafar
dufferzafar / Openage-Build-172.log
Created February 16, 2015 22:24
Building Pull 172 for Openage.
~/d/c/openage (pr/172) > ./configure
_________________________________________
/ ./configure is a convenience script \
| that creates the build directory and |
| invokes cmake for an out-of-source |
| build. |
| |
| don't feel obliged to use this, |
\ especially if you're packaging openage. /
-----------------------------------------
@dufferzafar
dufferzafar / view_html.py
Created February 21, 2015 09:19
Python function to view html file in a browser.
def view(html, rm=False):
"""View HTML in a browser."""
# So many imports :O
import os
import webbrowser
import string
import random
# Remove preview random files
@dufferzafar
dufferzafar / hexa.cpp
Created March 10, 2015 16:18
Hexagon Rotation
/*
* GL05IdleFunc.cpp: Translation and Rotation
* Transform primitives from their model spaces to world space (Model Transform).
*/
#include <windows.h> // for MS Windows
#include <GL/glut.h> // GLUT, include glu.h and gl.h
// Global variable
GLfloat angle = 0.0f; // Current rotational angle of the shapes
@dufferzafar
dufferzafar / serving.py.diff
Last active February 13, 2016 17:16
Add django's runserver like colored terminal output to werkzeug's run_simple. Requires termcolor & colorama.
--- env/lib/python2.7/site-packages/werkzeug/serving.py
+++ env/lib/python2.7/site-packages/werkzeug/serving.py
@@ -42,6 +42,10 @@
import sys
import ssl
import signal
+
+from termcolor import colored
+from colorama import init
+init()
@dufferzafar
dufferzafar / client.py
Last active August 29, 2015 14:17
Python Socket Program.
import sys
from socket import socket, AF_INET, SOCK_DGRAM
SERVER_IP = '127.0.0.1'
PORT_NUMBER = 5000
SIZE = 1024
print("Test client sending packets to IP {0}, via port {1}\n".format(SERVER_IP, PORT_NUMBER))
mySocket = socket(AF_INET, SOCK_DGRAM)
@dufferzafar
dufferzafar / GSoC 2015 - Proposal.md
Last active August 29, 2015 14:17
Proposal for Google Summer of Code (2015) - Metabrainz

Improvements to CritiqueBrainz

Personal Information

Name: Shadab Zafar

@dufferzafar
dufferzafar / dufferzafar-mb.md
Created March 18, 2015 19:09
MusicBrainz Wiki's User Page

Hi, I am Shadab Zafar, a CS undergrad from India.

I found out about MusicBrainz Picard in Nov 2013 while looking for a tool to tag my songs. A friend then told me that there was a GSoC project on the same tool, I applied for the project and got selected so during 2014's summer, I worked on creating the current Picard's site & API and adding Plugin Download features to Picard.

== Todo List ==

=== Add Data ===

I have a lot of old untagged bollywood music (songs by Lata, Mukesh, Rafi etc.), I've thought of adding it many times, but just couldn't get it done.

@dufferzafar
dufferzafar / GSoC 2015 - Updated Proposal.md
Last active August 29, 2015 14:17
Updated Proposal for GSoC 2015. CritiqueBrainz Project. The previous proposal was a bit too ambitious. #gsoc
@dufferzafar
dufferzafar / Readme.md
Last active August 29, 2015 14:19
Personal Projects Page
@dufferzafar
dufferzafar / Readme.md
Last active August 29, 2015 14:20
DHCP & Mail Server

Setup

git clone https://gist.github.com/dufferzafar/e7328e12332a75951c36 lul-lab

sudo bash mail.sh

Test sending/recieving mail.

sudo bash dhcp.sh