Skip to content

Instantly share code, notes, and snippets.

View yasoob's full-sized avatar

M.Yasoob Ullah Khalid ☺ yasoob

View GitHub Profile
yasoob /
Last active October 26, 2022 13:24
A pure Python Universal Product Code A barcode generator.
import xml.dom
import os
class UPC:
The all-in-one class that represents the UPC-A

Installing Wine 1.8 on Ubuntu 14.04

Wine is a Compatibility layer for running windows applications on Linux and Mac OSX. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly.

In this post I will show you how you can install Wine on Ubuntu 14.04. It is really easy to install it. We will be doing most of our work on the command-line using apt. It is the best and easiest way to add ppas and install pakages in linux.

Adding the PPA:

yasoob /
Last active December 22, 2015 15:23
Flask login app.

Making a Flask app with login functionality

Hi there guys! In this post I will share my experience with you while developing a Flask app with login functionality. The sourcecode of the app is available here.

We will be using the following libraries:

  • Flask (obviously)
  • Flask-SQLAlchemy
  • Jinja2
yasoob / README
Created December 16, 2015 23:29 — forked from navinpai/README
Simple CSS Blinking Cursor
Simple blinking cursor... code from ... Ofcourse I don't own the code! Just keeping it here as a reference of the CSS3 code used.
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
# 1. Install pandoc from
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
# By default this will keep the original .md file
<html xmlns=""><head>
<!-- NAME: 1 COLUMN - BANDED -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blurb: Top scientific news and thought provoking questions straight to you.</title>
<style type="text/css">
height:100% !important;

Suppose I have three containers of variable width and height:

Container 1

|           |
|           |
|           |

| |

yasoob / gist:937b939b54dbf4d2b225
Created January 19, 2015 16:06
Solution for Problem one EdX
def payment(month, balance, AIRate, MPRate):
minimumPayment = balance * MPRate
remainingBalance = balance - minimumPayment
unpayedBalance = balance-minimumPayment
interest = (AIRate/12) * unpayedBalance
balance = unpayedBalance + interest
print "Month:", month
print "Minimum monthly payment: %.2f" %(minimumPayment)
[JS] Jump Start: Your commandline companion
js add <name> <file>
js rm (<name> | --all)
js show (--all | -a)
js <name>
yasoob /
Created June 9, 2013 17:23
Myspace downloader
#!/usr/bin/env python3
import urllib.request
url = ''
data = b'term=incomplete&maxArtists=10&maxSongs=20'
headers = {
req = urllib.request.Request(url, data, headers)