Skip to content

Instantly share code, notes, and snippets.

Mahdi Yusuf myusuf3

Block or report user

Report or block myusuf3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
myusuf3 /
Last active Sep 20, 2017
script to check if apple site is up and running again.
from lxml import etree, html
import time
import requests
def main():
response = requests.get('')
body = response.text
myusuf3 / banal-apps.txt
Last active Aug 29, 2015
Merely gathering up a list of apps that people are tired of rolling their own constantly. I would love to hear what you guys would want built out once and for all.
View banal-apps.txt
- banal-signup (user management)
- banal-payments (cash money)
- banal-betalist (beta list hype tools)
myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
# - curl | bash
View gist:5681305
for k,v in propertyDict:
for k1,v2 in propertyDict[k]:
print('---' + k1 + '---' + propertyDict[k][k1])
# Then you can do things like, etc.
pip install -r requirements.txt -u prod
myusuf3 /
Created Apr 23, 2013
Simple little profiling decorator in python.
import cProfile
def profile_this(fn):
def profiled_fn(*args, **kwargs):
# name for profile dump
fpath = fn.__name__ + '.profile'
prof = cProfile.Profile()
ret = prof.runcall(fn, *args, **kwargs)
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
myusuf3 /
Created Dec 10, 2012
Code of Conduct: Open Source

I am writing this mostly out of frustration with developers. Hopefully this can shine some rules of conduct when discussing software on a medium like Github.

Being a developer, I understand that there are many things combating beautifully crafted software but thats the beauty of open source:

- Your time. 
- Your release dates. 
- Your requirements.

Another beauty of open source is collaboration and collective effort to craft better software .

myusuf3 /
Created Nov 7, 2012
get image from url
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
# with Exhibit B.
# Software distributed under the License is distributed on an "AS IS" basis,
You can’t perform that action at this time.