Skip to content

Instantly share code, notes, and snippets.

View myusuf3's full-sized avatar
🏠
Working from home

Mahdi Yusuf myusuf3

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
CONNECT_URL="http://saucelabs.com/downloads/Sauce-Connect-latest.zip"
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
CONNECT_DOWNLOAD="Sauce_Connect.zip"
READY_FILE="connect-ready-$RANDOM"
@myusuf3
myusuf3 / banal-apps.txt
Last active August 29, 2015 14:16
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.
- banal-signup (user management)
- banal-payments (cash money)
- banal-betalist (beta list hype tools)
@myusuf3
myusuf3 / models.py
Created March 13, 2011 04:03
currently what I have not completed all the way through
from django.db import models
from django.contrib.auth.models import User
class ProloggerUserManager(models.Manager):
def create_user(self, user):
pro = ProloggerUser(user = user)
pro.save()
class AchievementsManager(models.Manager):
pass
@myusuf3
myusuf3 / shift command
Created April 12, 2011 19:00
bashfu - shift command
#!/bin/bash
# This script can clean up files that were last accessed over 365 days ago.
USAGE="Usage: $0 dir1 dir2 dir3 ... dirN"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 19:49
using pip to install into virtual env
$ pip install -E django-mimo Django
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 20:19
opening virtualenv
# activating newly create virtualenv
$ source django-mimo/bin/activate
# your prompt should change to something similar the following
(django-mimo)$
# in order to get back to system all you need to do is
(django-mimo)$ deactivate
$
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 20:28
installing pip with easy_install
sudo easy_install -U pip
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 19:34
installing easy_install
$ sudo apt-get install python-setuptools python-dev build-essential
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 19:44
creating a new virtualenv
$ virtualenv --no-site-packages django-mimo
@myusuf3
myusuf3 / bash.sh
Created May 7, 2011 20:00
freezing
# creating requirements file from a virtualenv setup
$ pip freeze -E django-mimo > requirements.txt
# installing from a requirements file
$ pip install -E django-mimo -r requirements.txt