TroyGrosfield.com TroyGrosfield.com

Headline

Python virtualenv and virtualenvwrapper Cheat Sheet

Author
by Troy Grosfield
Date
April 20th, 2013
Category
Developer
Story

Commands for working with virtualenv and virtualenvwrapper. Installation Assuming you already have pip installed: $ sudo pip install -U virtualenv Install virtualenvwrapper $ sudo pip install -U virtualenvwrapper Create virtualenv $ mkvirtualenv <env_name> $ mkvirtualenv my_env Create Virtualenv with a different python My current system python is version 2.7.2.  I want my virtualenv to use … read more

Tags
Comments
No Comments »
Headline

Working with CSS Positions: Creating a Simple Progress Bar

Author
by Troy Grosfield
Date
February 11th, 2013
Category
Developer
Story

Working with CSS positioning can be tricky at times.  There are a few affects that you want to achieve, but aren’t quite sure how.  In the below example, I’ll show you how to create a simple progress bar affect using styles. The affect we’re trying to achieve Styles Give all components a common width: .container, … read more

Tags
Comments
No Comments »
Headline

Git Cheat Sheet

Author
by Troy Grosfield
Date
February 7th, 2013
Category
Developer
Story

Git commands and working with Github. Create a Repository Steps to create a new repository in github. Go to github and log in. In the top right you’ll see an icon to create a repository. Click that link. Enter a repository name. Separate words with dashes (i.e. my-first-repo) Enter a description for what the repository … read more

Tags
Comments
No Comments »
Headline

Generating an SSH Key for Github

Author
by Troy Grosfield
Date
February 7th, 2013
Category
Developer
Story

These are the steps to generate a new ssh key for Github: Open terminal and run the following command: $ ssh-keygen -t rsa you will be prompted to for the location to save the key: Enter file in which to save the key (/Users/USERNAME/.ssh/id_rsa): /Users/USERNAME/.ssh/your_key_name Two key will have been generated at the path you … read more

Tags
Comments
No Comments »
Headline

Naming CSS Classes

Author
by Troy Grosfield
Date
January 3rd, 2013
Category
Developer
Story

There are lots of questions when styling a web page of “what should I name this CSS class”.  Here are a few things to think about as you ponder your decision. Leave implementation logic out of class names!  I’ll use Twitter Bootstrap (which by the way is awesome) as an example.   Sometimes they do … read more

Tags
Comments
No Comments »
Headline

DevCon 2012 Presentation – MongoDB, NoSQL and all of its Awesomeness

Author
by Troy Grosfield
Date
July 31st, 2012
Category
Developer
Story

Gave this presentation at Cerner’s DevCon 2012 talking about MongoDB and NoSQL. Was presented to about 150+ people. Video

Tags
Comments
No Comments »
Headline

Web Developer Meetup Presentation: MongoDB and NoSQL

Author
by Troy Grosfield
Date
March 30th, 2012
Category
Developer
Story

Gave a presentation to the web developer meetup group at Cerner talking about MongoDB and NoSQL. Video

Tags
Comments
No Comments »
Headline

Unix Command Line Cheat Sheet

Author
by Troy Grosfield
Date
February 24th, 2012
Category
Developer
Story

Here are some unix commands I find useful. Display All Running Processes $ ps aux Limit to only look at celeryd processes: $ ps aux | grep celeryd List Contents of a Directory including Hidden Files/Folders: $ ls -l -a Searching Find all files with some text in the file: find . -exec grep -l … read more

Tags
Comments
1 Comment »
Headline

Ubuntu Bus Error

Author
by Troy Grosfield
Date
February 23rd, 2012
Category
Developer
Story

The Problem Ran into an issue where we couldn’t restart celeryd on our production servers.  When we’d try to restart celery using our init.d script we would see the following: $ /etc/init.d/celeryd restart Bus error We then tried to go to our Django project and go into the shell and came across the same error: … read more

Tags
Comments
No Comments »
Headline

MongoDB Cheat Sheet

Author
by Troy Grosfield
Date
February 22nd, 2012
Category
Developer
Story

A few commands that help with querying and troubleshooting mongodb. This document assumes we have a database called “test” and we have a collection called “comments”. Commands Number of documents in a collection: $ db.comments.count() 42232 Show the size of the Index: $ db.comments.totalIndexSize(); 73696 Show details of a specific query: $ db.comments.find({ tags : … read more

Tags
Comments
1 Comment »