A blog about technology, photography, and stuff

Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Monday, September 22, 2014

Building my own Photography Site

A few weeks ago my SmugMug account expired and I didn't bother to renew it. This is where my photography website, Sunpech Photography, used to be hosted. I wasn't fully utilizing it to make sales nor was I pushing it very much to friends, family, and even clients. So I couldn't justify spending any money on it when I'd rather make sales on 500px and 500px Art.

Surprisingly my account was discontinued almost immediately and I whipped up a decent site in less than 24 hours along with appropriate DNS changes just so I didn't have an ugly 404 page.

Motivations

Besides saving money I have other motivations to building my own site almost from scratch.

I felt I could build my own photography site the way I wanted it-- for basically free. So in a matter of a few days I completed a lot of what I wanted using Ruby on RailsHerokuAmazon Web ServicesTwitter Bootstrap, and Font Awesome. With TB the site is well equipped to be mobile and tablet friendly.

I've been promoting sales on 500px Art, but that may change in the future. With 500px going through some internal changes recently, I need to protect any SEO karma I've built. I want to be able to simply change the buy print link en masse rather than fixing them one by one-- which I have to do for this blog.

New Website

I'm happy to announce that I have launched it in it's current state, which I deem ready for public consumption. I still have some features I want to add such as multi photo uploads, better social media linking, and client login. But at it's current build it's usable for my needs.

My renovated photography site: http://www.sunpechphotography.com


Screenshot of the new photography site


Sunday, April 27, 2014

Heroku Postgres Maintenance Requires Manually Updating DATABASE_URL

Earlier this week I got an email from Heroku that one of my postgres databases required maintenance. This is the email:
bot (Heroku Support)
Apr 25 14:02
Your database HEROKU_POSTGRESQL_COLOR_URL on <project_name> requires maintenance. During this period, your database credentials will become read-only. Once it has completed, your database URL will have changed, but we will update your app's config variables accordingly.
This automated maintenance is a necessary part of our Starter tier plans, Dev and Basic. Should you need more control over maintenance windows, a production database (Crane or higher) offers more control over database maintenance, as we are able to schedule them in advance and provide better tools for self-served maintenance.
We expect maintenance to last just a few moments. We will update this ticket when maintenance begins, and again once it's complete.
I'm fine with maintenance and the short notice. I do have a free plan in place as it is one of my many personal projects. What I found to be interesting is the following:
Once it has completed, your database URL will have changed, but we will update your app's config variables accordingly.
I didn't even know they could update the variables of my app without me! So I login to my Heroku account and see what the new credentials are, so I can update my project and check those changes into git.



Noted, copied, and pasted. Done. The new credentials are updated in my local project as well as my project origin. At this point I haven't even checked to see if the website is even up yet. Turns out, it's not up. The app keeps crashing. I check the logs with heroku logs --tail and find something like following repeating:
2014-04-25T14:11:59+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes= (Note: not exact error message.)
The error message is not very helpful-- yes I know the website keeps crashing, I can see that for myself! Even worse, googling it doesn't yield any results to help fix my particular issue.

My initial thought was that this was an older rails project and something was outdated or something new was pushed accidentally. So after a long time of fiddling around with not just my code, error logs, various settings, Gemfile, etc-- I notice something in the logs about a postgres connection failure with what appears to be my old credentials. I run the command heroku config and get:



This is where I noticed that the values for DATABASE_URL had the old credentials in it, while the HEROKU_POSTGRESQL_COLOR_URL had the new values. So I updated DATABASE_URL with the following command:
heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
See Heroku Postgres: Establish primary DB. Please replace COLOR in my variables with whatever is the name/color of you database.

This will update DATABASE_URL to the new and correct credentials. After doing this my site was up and running again. This is something Heroku should have done automatically if they were going to make any changes on my behalf.

I hope this helps others, or even myself in the future!

Update 4/29/2014: A Heroku developer contacted me and looked into my problem for me. He stated that normally the DATABASE_URL will also get updated along with any changes. Although they weren't able to find out why the changes didn't propagate for me, they will monitor this kind situation in the future.

Wednesday, November 14, 2012

Setting up Windows Phone 8 Emulator on a Virtual Machine

Not long ago I blogged about Installing Windows 8 Pro on Parallels Desktop 8. That of course worked for me, but when it came time to having Visual Studio 2012 (VS2012) and running an emulator for Windows Phone 8, it simply doesn't work. I searched the Internet as to why, and came up with the following links:
As a lot of people pointed out, it's not really possible in Parallels Desktop 8 (PD8), but is possible through VMware Fusion 5 (VMF5) with a small workaround.



I recommend following this guide, but will supplement some more information as it pertains to VMF5, as it's not exactly the same as VMware Workstation 9.

First off, I recommend installing from scratch. I tried to import my existing virtual machine created through PD8, and failed many, many, many times. I ended up with a blue screen screen and countless reboots that try to fix something that didn't get fixed. Save yourself time and just do a clean install of Windows 8 on VMF5.

Even if you have or haven't installed VS2012 with Windows Phone 8 SDK, you should uninstall Hyper-V.

You can get to this in Windows 8 through Control Panel and search for "windows features". Then click on "Turn Windows features on or off".


Make sure these boxes are unchecked, as in off. You'll check these back on later.


Next in the virtual machine's settings, in Processors & Memory, uncheck "Enable hypervisor applications in this virtual machine". You'll check this back on later.




Next you have the Virtual Machine Library window open, and then right click + hold alt (option) key to get the option to "Open Config File in Editor".


Here add the following settings, as they shouldn't exist.

hypervisor.cpuid.v0 = "FALSE" 
mce.enable = "TRUE"



Finally, check back on everything you unchecked from before. A restart is probably needed for the Windows Hyper-V install again.

Now you'll be able to run a Windows Phone Emulator within VMware Fusion 5, on a Mac!


Happy coding!

Note: I haven't purchased my copy of VMware Fusion 5 yet. I'll likely buy it before the 30-day trial is up.

Tuesday, February 07, 2012

LADOTNET February Meetup

I attended the LADOTNET February meetup held at Blankspaces last night. The event topic was: Start ups, Tech and Business Trends with John Shiple. The attendance was pretty massive as this user group is getting bigger and bigger every month. I enjoyed the speaker and presentation a lot. I do notice that it's a trend that there are a lot of startup businesses growing outside of Silicon Valley.

More speaker information:

John Shiple
@FreelanceCTO
FreelanceCTO.com

Also want to point out:

EA Developer's Contest
When: February 24-26th, 2012 (Friday-Sunday)
Where: UCLA Anderson School of Management Campus (map)

You can see all the pictures I took at the event here, where I dump all my meetup pictures for this year. Here are some of the pictures I took:

















John Shiple














Beer and hanging out at Busby's after the meetup.






Some recent articles I've read:

Monday, January 30, 2012

Pictures from SoCal Code Camp

Over the weekend I attended and volunteered at SoCal Code Camp at California State University Fullerton. I had an awesome time, attended quite a few sessions, learned a lot, and met quite a few good people.

Below are some of the pictures. Full set of pictures can be found here.





Mario Harnandez presenting CSS3 for Web Designers- Let's Design a Visually Appealing Website and Grid Systems - Picking the Right CSS Framework for Your Website.




Kim Smith-Rohlfs presenting Working For Startups- What You Need to Know.












Lynn Langit presenting BI/Big Data Futures - Is it really all about the Cloud?


Geek Dinner














Li Chen presenting It is Time to Rev Up your Javascript Skill.




Nuri Halperin presenting Driving Electric - An all Electric Car Info Session and NoSQL for Beginners parts 1 and 2.




David McCarter presenting How to Survive the Technical Interview.


Raffle schwag to be given out at the end of the day.


Everyone gathering around for the raffle drawings.














Volunteers!