TroyGrosfield.com TroyGrosfield.com

Headline

JQuery Sorting by Attribute Value

Author
by Troy Grosfield
Date
April 25th, 2014
Category
Developer
Story

Since jquery objects are “array-like” and not actual arrays,  things like “sort” raise a few questions after inspecting jquery code.  As of jquery 2.1.0 you notice that “sort” isn’t a document method and diving into the source, you’ll see that it’s for internal use only: // For internal use only. // Behaves like an Array’s … read more

Tags
Comments
No Comments »
Headline

Making the Move to Python 3: Python3, Virtual Environments and pip

Author
by Troy Grosfield
Date
January 9th, 2014
Category
Developer
Story

I finally made the move to converting all my apps to python 3 and it wasn’t nearly as painful as I was expecting.  One main hurdle was to figure out how to correctly get a virtual environment created with python 3 using the correct version of pip. My initial attempt to create a virtual environment … read more

Tags
Comments
No Comments »
Headline

Code Review Etiquette

Author
by Troy Grosfield
Date
December 9th, 2013
Category
Developer
Story

I always enjoy code reviews because they usually bring up some great teaching points and discussions. With that being said, I always feel compelled to make sure everyone’s on the same page with code reviews. Don’t Take it Personal! First and foremost, don’t take comments personal! Developers are short and to the point with comments … read more

Tags
Comments
No Comments »
Headline

Create a Screenshot Using PhantomJS

Author
by Troy Grosfield
Date
November 27th, 2013
Category
Developer
Story

I found this to be a bit interesting so I thought I would share with others.  My goal was to find a way to automate taking a screenshot of a website.  Below is an example of how to do it in PhantomJS: Install PhantomJS There page pretty much explains everything: http://phantomjs.org/download.html I’m on a Mac … read more

Tags
Comments
No Comments »
Headline

Contributing to Pypi

Author
by Troy Grosfield
Date
November 6th, 2013
Category
Developer
Story

Below will show the steps you need to take to register and upload your app to Pypi, then to create a tag in github for the uploaded version. Register An App in Pypi $ django-awesome-bootstrap git:(master) python setup.py register running register running egg_info writing django_awesome_bootstrap.egg-info/PKG-INFO writing top-level names to django_awesome_bootstrap.egg-info/top_level.txt writing dependency_links to django_awesome_bootstrap.egg-info/dependency_links.txt reading … read more

Tags
Comments
No Comments »
Headline

Europe 2013 Day 7 – London, Buckingham Palace, London Bridge, Eye of London, Big Ben

Author
by Troy Grosfield
Date
August 9th, 2013
Category
Travel
Story

London Eye The eye of London is a giant ferris wheel that gives you a bird’s eye view of all of London. It looked pretty cool, but was £20 to ride and didn’t look to eventful or long so we decided not to go on it. Big Ben Big Ben is a giant clock tower … read more

Tags
Comments
No Comments »
Headline

Europe 2013 Day 2-6 – TomorrowLand

Author
by Troy Grosfield
Date
August 9th, 2013
Category
Travel
Story

TomorrowLand is a music festival in Boom, Belgium that attracts some of the top DJ’s in the world and brings in people from about as many countries as the olympics Travel We took a high speed train from London to Brussels, Belgium that actually goes under the the English Channel. The TomorrowLand organizers put everyone … read more

Tags
Comments
No Comments »
Headline

Europe 2013 Day 1 – London, King’s Cross Station, St. Pancras International, Clink Hostel, O’Neills Pub

Author
by Troy Grosfield
Date
July 25th, 2013
Category
Travel
Story

And so the journey off to Europe for round 2 to this amazing continent begins. Like last Europe trip, once again jet lag took its toll. I wanted to sleep on the flight over, but ended up watching two movies and drinking with Andrew which made the flight go by fast, but also meant no … read more

Tags
Comments
No Comments »
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 »