Bash-Shell.Net

I'm a developer, not a writer

New Balance Fresh Foam Vongo Followup

by justin on Aug. 21, 2016, 1:40 p.m. UTC

I've put about 250 miles on these shoes now and they are great.  Knee pain I've been battling with since starting running seriously is gone and I've increased my mileage.  I wish the forefoot/toe area was a little more flexible and I have some concerns about how the insole is wearing.  The sole/tread has a large open gap down the middle and the insole shows a visible crease right there as well.  I do need to try out a bit larger shoe next time, though.  I am currently using a 12 2E, but ...

→ read more

New Balance Fresh Foam Vongo 1st Run

by justin on June 25, 2016, 3:36 p.m. UTC

I've kept the rare posts on this blog technical, but I'm expanding in hopes of having more to say.  Back in August or September 2015 I started running fairly seriously.  Since then I have been on the search for running shoes which don't suck.  I have wide, flat feet, with additional weird bones on the outsides near the middle which stick our further than on anyone else I have spoken with about it.  It makes it hard to find decent shoes which fit.  Additionally I've been fighting with knee pain... possibly due to over pronation ...

→ read more

What's Going On?

by justin on May 14, 2016, 2:44 a.m. UTC

Alright, so I finished my final class for my Associate's Degree in Computer Science after many years of slowly taking classes while working full time and having a child.  It's awesome.  I decided to immediately fill up my free time by modernizing the code running bash-shell.net a bit.  It's still nothing fancy, but doesn't need to be.  I finally updated Django to 1.9, generally reorganized code, added ssl using letsencrypt, and tonight I added django-wysiwyg to hopefully make posting easier and encourage me to do so.

I hope to continue to improve bash-shell.net's ...

→ read more

Reworking The Code

by justin on May 7, 2016, 12:13 p.m. UTC

Just a small post here. Finally done with school and work has begun on updating the code for this blog. I am moving models and apps around to align with how I would do it these days, use newer features, etc. My hope is to get this thing in a state where I really would like to post more.

The first step has been moving apps around. I will then strip out some older functionality like get_user_profile() and use a custom user model, get rid of South and update to a modern Django version, add in a nice text editor ...

→ read more

Django-Fractions

by justin on Aug. 1, 2015, 8:58 a.m. UTC

I just put my latest project, django-fractions, up on github. It's a set of tools for manipulating fractions on Django sites. It is not fully fleshed out yet, needs test cases, etc. This was extracted from a separate (yet to be made public) project and code which was specific to that project. It's useful and works well enough as is, so I figured I should take the first step and get it on github, which will hopefully inspire me to finish cleaning it up.

→ read more

RequireJS Shared Modules and Cache Busting with Django-Require

by justin on Aug. 26, 2014, 2:55 a.m. UTC

I've recently been experimenting with using RequireJS in a Django environment. The biggest hurdle I ran across was cache busting and that I'm using a multi-page setup, with some shared js, and knockout with a viewmodel for handling the navbar which is on every page. Django-Require comes with two classes for managing static files, OptimizedStaticFilesStorage and OptimizedCachedStaticFilesStorage, the latter of which provides hashed filenames so that as your files change long cache times don't cause stale files to be served. The OptimizedCachedStaticFilesStorage only works when using the require template tag which comes as part of django-require.

In ...

→ read more

Django, CORS, and CSRF Validation

by justin on Aug. 16, 2014, 7:41 p.m. UTC

This week I had the need to build some functionality on a Django site where a small part of the site would live on a subdomain. So, for example, if the main site was on example.com, this new bit needed to be on abc.example.com. The two parts of the site share sessions, cookies, and so on and abc.example.com needs to be able to make POST requests to AJAX form handlers on example.com (with a bit of an exception I'll get to in a moment).

For the domain and subdomain with share sessions the ...

→ read more

RequireJS and Django

by justin on May 5, 2014, 1:49 a.m. UTC

I just finished converting one of my projects over to using RequireJS. I've been moving towards more Javascript heavy stuff lately and keeping all of the dependencies in order has begun to get very messy. RequireJS seemed to be the standard way of managing this, so I decided to give it a try on one of my side projects (which will hopefully go live soon-ish).

RequireJS basically gives you about as close as you're going to get to includes in other languages implemented in Javascript. Overall it works very well, with just a couple of small, easy to ...

→ read more

Private Read The Docs With Private Github Repo

by justin on April 19, 2014, 8:48 p.m. UTC

I did a bit of experimenting with setting up a local, private read the docs server to use at work for documenting our Django apps which do not have public code. This is pretty easy once you know what to do, but the steps you need to take may not be immediately obvious. Start out by setting up your own Read The Docs stuff as documented.

After that, create a local_settings.py file and add in ALLOW_PRIVATE_REPOS = True there. This setting will allow you to use x-oauth-basic urls for your github repos.

Now go to your github project's settings ...

→ read more

File Iteration With python-mock

by justin on Feb. 27, 2014, 2:06 a.m. UTC

I came across a unit test situation recently where I did not want to litter my project with test files for reading. I did some looking and python-mock has a way to mock open, but there are a couple of things to watch out for. What is documented there doesn't quite work right off the bat. The documentation shows this:

with patch('__main__.open', mock_open(read_data='bibble'), create=True) as m:
    with open('foo') as h:
        result = h.read()

Simple enough. Except right away, that __main__.open actually needs to be __builtin__.open, at least on Python 2.7 ...

→ read more

A New Project and More KnockoutJS

by justin on Jan. 12, 2014, 8:42 p.m. UTC

I've begun a new side project. This one might actually get finished and permanently hosted, even. The main purpose of the project is for me to play with Django Rest Framework and more KnockoutJS. So far I'm really liking both. Django Rest Framework is proving to be much easier to work with than Tastypie once I need to break away from the standard. I find splitting the serializers out from the views/endpoints and being able to route by request method to be far more flexible.

KnockoutJS also continues to be flexible and provider cleaner, more maintainable UI ...

→ read more

Playing With KnockoutJS

by justin on Dec. 18, 2013, 2:39 a.m. UTC

I've been trying to build up my front end dev skills a bit lately and get to know some of the front end JavaScript frameworks out there better, or in some cases, at all. The most interesting thing I've been working with lately is KnockoutJS. The short description of what it does is that rather than hand writing all of the event bindings using jQuery or whatever you like, you add a bit of extra markup in the HTML and a few simple, mostly single line variable declarations/assignments in your JavaScript. Knockout then handles the event binding ...

→ read more

Things I've learned

by justin on Nov. 22, 2013, 1:26 a.m. UTC

So I've learned some things since my last post on here.

For one, people actually come to my little website. I did not know this. I haven't run any usage tracking stuff for a long time and just kind of figured it's a tiny blog thing which I don't advertise and I'm not famous, so it must get like 2 hits per year. I got bored and set up Google Analytics a few days ago and it turns out more people visit each day than I thought did in a year. Not tons. Not even ...

→ read more

Django Project Structure Test

by justin on July 14, 2013, 11:08 p.m. UTC

I've started a second small to mid sized project to go along with Djukebox. I'm using this to test something out with Django projects to see what I prefer. With Djukebox I just made it a proper installable app that you can install with pip (if I put it on pypi). I like this because then you can easily start a project called whatever you want, which does anything you want, and add Djukebox to it. It also makes it easy to distribute without tying myself or anyone else to a specific project structure, you set up your ...

→ read more

Track data editing finally added to Djukebox

by justin on May 28, 2013, 2 a.m. UTC

I finally got done adding track editing data to Djukebox. I can't remember when I started on this, but I believe it was well over 6 months ago. I had a lot of delays and not much free time in getting it done. I took two calculus classes, had my employer shut down all in house software development and lay off the entire team and so had to find a new job, and had a baby. It's been a long time coming, but the functionality is finally added.

I learned some things while adding the new features. I ...

→ read more
Member of The Internet Defense League