Entries in " geek "  

Dealing With Business Emergencies

Friday, February 15, 2008 - 1:04 PM

Fun morning for me today. I use Amazon S3 service for storage of various files, including the static media for most of my websites. This morning there was a major outage across the AWS farm. After noticing the errors I began to scramble to figure out what was going on. Obviously the issue was on the remote side (Amazon) so I had to sit and wait it out.

The outage seemed to last about 3 hours (for me, others are still reporting issues.) While S3 is an awesome service and very affordable, this shows that nothing is fail proof. Even with this outage, their service falls into their 99.9% SLA.

These things happen

I've spent a lot of time on the other side of this fence. Trying to figure out what is causing a major outage, dealing with pissed users and keeping the bosses away long enough to get my job done. I understand that "these things happen," but how do you convey that to your customer who's service is effected as a result?

It's also difficult to accept when you are losing money as a result of an outage such as this. Luckily I keep backups of all my sites so if I needed to I could upload the static content and change the templates to reflect that. But that is a lot of work and money will still be lost during the down time.

How to deal?

There really is no need for huffing and puffing in the beginning. Especially since the service is still operating under their 99.9% uptime SLA. Once it begins operating outside of that SLA, is when the yelling may start. Obviously the situation will be different for everyone. There are a lot of startups who depend on Amazon AWS services right now.

You have to make a rational decision when is it time to quit the service. Do you have a back up plan? If not, you should. If your history with the service in question is a very positive one, then forgive them for their "bad" and continue on. If they have a bad or unstable history then look into an alternative and take your business else where.

A lot of times switching companies/services is easier said than done. It will probably come down to which scenario loses more money. Putting up with the bad service or the amount of man hours required to switch. In the long run, it's almost always smarter to dump the bad service.

In the case of Amazon, I've been very happy with their service and this outage today wasn't that big of an issue though I'm sure many would disagree.

Technorati Tags: , , , , ,

Posted by Peter Sanchez in business, geek, news, technology 0 comments
 

Page Peel Away Ad - For Free!

Tuesday, February 12, 2008 - 2:59 PM

I ran across this article today by John Chow talking about the more and more popular peel away ad. It's basically an ad that sits in the corner of your website and "peels away" when your visitor places their mouse over the ad.

Some people are reporting a lot of success using this type of ad. In John's article he is promoting the product for the special price of $37. While I am sure this is a good price — and I hate to step on any toes — but there is another option.

You can get a script that does the exact same thing for free. The script is called PageEar and can be downloaded here. I don't personally use this script for anything but I have buddies who do and they claim it works fine and functions properly across all standard web browsers.

I have no clue what is involved in adding this to your blogging platform (wordpress, etc.) as I use custom software that I created. I am sure it's quite easy using your systems template editor.

So there you have it, my gift to you. If anything I saved you from doing a google search and finding this yourself :)

Download PageEar here

Technorati Tags: , , ,

Posted by Peter Sanchez in geek, internet marketing, technology 0 comments
 

Web Designers Are Worth Their Weight In Gold

Saturday, February 9, 2008 - 8:47 AM

I realize that the title is pretty obvious in the internet marketing world but it's something that many of us forget far too often. A good web & graphics designer can sky rocket your conversions (profits) and turn an OK campaign into a great one.

One thing I usually try to do when creating a new web page is take a free template and tweak it into something I think looks good. Problem is that I don't have a creative bone in my body — at least in the web design sense. The end result is I wasted time because I still end up paying someone a few bucks to make a nicer page for me.

I am a programmer not a designer and because I know how to write HTML, and CSS to a lesser degree, doesn't mean that I should. I've also purchased templates in the past and that has been OK but my best results have always come from a unique design created by someone with the proper mind for it. Meaning, someone who can envision the website and then bring it to life.

Finding a good designer is not always easy. I use two guys who I got via a referral and they give me a break on the price. I usually only need a single page from them and I can create any other pages needed from their one page template. So that helps lower the cost but I still have to pay for any additional graphics I may need.

Here is a recent example. I built a "rating" type site for a niche I am starting to promote. After the usual test, tweak, repeat process I didn't feel it was performing very well. The next step was the design and that cost me money that I was trying to save for advertising costs. After the new design was ready and put in place, I saw conversions jump up at least 150%. I still can't explain it because the site doesn't look so great to me, and presents the same information as the old design, but it obviously has something that is more appealing to the end user. My brain just doesn't see things in that way.

As a programmer I tend to want to do things myself. Sort a control freak I suppose. I am slowly learning that design is something I need to outsource because in the long run, I'll save time and money.

Technorati Tags: , , ,

Posted by Peter Sanchez in business, geek, internet marketing, pay per click 0 comments
 

Up Your Profits With Google Checkout

Monday, January 28, 2008 - 11:58 AM

I, like many, have been frustrated with Paypal the last few years. Their policy is a little one sided and it's the merchant who gets the short end of the stick. I know I am not the only one who has had their entire account locked—with all funds frozen—as a result of a single complaint from a buyer. I slowly took my payment processing to other venues and basically only use Paypal for eBay purchases now.

How are we supposed to process orders without a payment processing partner? There are many options out there that are suitable for selling goods (digital or not) online. If you want to go all out you can get a merchant account and setup an account with a gateway processor, such as Authorize.net or USAePay. That is a little extreme for most of us, especially those sites that are only selling a digital product (eBook, spreadsheet, etc.)

ClickBank is a very popular alternative for people who are selling eBooks online. I am one of those odd people who has never used ClickBank before so I don't have a real opinion on them. The people I know who use it say it's a decent system that they don't have too many complaints about. One thing I don't like about it though, is the $50 account setup fee. That's one of those things that makes me go Hmmmmm...

The option that is getting more and more popular is Google Checkout. I have been working with Google Checkout the last few months and honestly haven't had many issues. It does require a little more work on the merchant's part if you are selling digital goods. Basically you need to have a script running somewhere to process orders on your end and automatically email out the download information for your product.

It's software integration ability makes Paypal's look like childs play. Since I am also a programmer, I have been working on a system to automate my side of the Checkout purchases. I have been using gchecky module (written in Python) for my development and it's been a breeze to work with. There are also multiple libraries that you can use for your own development. Maybe once I am done with my system I will give away a free, smaller, version of it for all of you out there.

Google dispute policy is much more neutral than Paypal & others. The few times I have had to deal with it they have been fair to both sides and resolved the dispute accordingly. I have a friend who charges 5-10K a day using Google Checkout and since Google does a lot of the verification work, his charge backs have nearly disappeared!

If you are looking for an alternative to Paypal, try out Google Checkout! I don't think you'll regret it.

Technorati Tags: , , , , ,

Posted by Peter Sanchez in business, geek, internet marketing, technology 2 comments
 

Reach Your Audience With Grand Central

Thursday, January 24, 2008 - 2:36 PM

Ever wanted to literally speak with the visitors to your website? There are many options for this, for example Skype, but none are as complete as GrandCentral. The service—which was purchased by Google—is an all-in-one service for your telephone(s).

The service has an awesome web button which can allow website visitors to call you straight from your website (without giving out your phone number). I recently started testing this on a website I own and in the last week have seen a 15% increase in conversions (even though I have only been called once!) I suppose it provides extra peace of mind to the visitors. It is important that your visitors trust you if you expect them to buy something you are recommending.

I use GrandCentral for more than my website traffic. I now only give out my GrandCentral number so I can easily screen the callers. The feature list resembles the features of a mini PBX system and the service is completely free (for now)!

The service is in beta, but you can go ahead and reserve a number now. I have five four invites left that I can give away. These will allow you to setup a GrandCentral number immediately. No waiting the days/weeks for your beta account to be accepted :) I will give those invites to the first five four readers who email me requesting an invite.

I will be testing the web button on another site beginning next week. Assuming it goes well I will be adding it to nearly all the websites I own. If you decide to try this out on your sites, let me know how it goes. I am very interested to see if adding these buttons makes a big difference across the board.

Technorati Tags: , , ,

Posted by Peter Sanchez in business, geek, internet marketing 0 comments
 

My Ears Were Burning

Tuesday, January 15, 2008 - 11:43 AM

I woke up this morning at about 3:15 AM when my oldest daughter came into my room complaining about her cough. She hasn't been feeling good so I had her come to sleep with my wife and I. I couldn't fall back asleep.

I laid there thinking about everything going on in my life right now. It's a very busy and exciting time for me. I lay awake for nearly 2 hours, just me and my thoughts. I've had a lot on my mind lately and I didn't realize that I had won a very prestigious award yesterday.

Chris Bloczynski had bestowed upon me the coveted "Fan of the Week" award!

I really was shocked to see my mug being shown in my Google Reader as I made my way through my daily RSS feeds this morning.

The picture that I use of me across the web is a funny one to me. I'm laid out on my buddies beat up couch at his bachelor pad. Stained carpets, mini fridge full of beer (in the living room) and 2 day old pizza in the oven. A real bachelor pad.

Anyways, thanks to Chris for the post about me. I'll have to see what else I can do to win more cool stuff!

Technorati Tags: , ,

Posted by Peter Sanchez in geek, general, news 3 comments
 

RSS Feeds That Fatten Your Wallet

Wednesday, January 9, 2008 - 7:24 PM

I've received a few emails asking what RSS feeds I read regularly. I figured it would be a fun post to list the feeds I read and why. So without further delay, here is my list of subscribed RSS feeds (all the links below will link to their RSS feeds, not their websites).

Marketing / Affiliate

Dosh Dosh - I found this one about a year ago accidently. There are some very well written posts on this blog. They are usually long and very informative.

Chris Bloczynski - I recently found this guy's blog and it's been a good read for me. A lot of discussion on writing and techniques.

John Chow - I read John Chow because, well, who doesn't read his blog?

Peter Sanchez - What? I can't verify that my RSS is updating correctly? So yea... I read my own stuff... OK!

UberAffiliate - Very informative blog. A lot of tips & tricks from the affiliate marketing world. One of my favorites from this category.

ShoeMoney - Not just a good source of information, but also for motivation. Guy has an awesome story.

Quick Sprout - I recently read about this one on ShoeMoney. So far it's a decent read, but I am still new here.

Tech

TechCrunch - Another one of those "Who doesn't read this" blogs. Latest news on startups and any other happenings in Silicon Valley.

The B-List - Very specific blog. Most of the posts are related to the Django project. Django is a python web framework that I have spent the last year learning & loving.

WAC - This guy is actually a friend of mine. Works at google, finds tons of OS X bugs, etc. A lot of family posts as well, but hey, I couldn't not list his blog too :)

Found+Read - Blog about the internet technologies and new startups.

Frank Addante - He's got a founder blog which discusses his various businesses. Smart guy with a track record for success. Not updated that often, but it's a good post when it is.

Paul Stamatiou - I know, I can't pronounce his last name either. This guy reviews all sorts of nifty stuff and has interesting posts that keep geeks like me coming back.

Peter Sanchez - Umm.. *cough*

Read/Write Web - News on startups, mergers, etc. Sort of like a smaller tech crunch but often profile startups that don't make it to TC.

Jason Calacanis - This is more of a personal blog of his but I do enjoy reading it. He is a successful business man who is also the founder of Mahalo.

Political

Donklephant - Awesome blog that I found when it was teeny tiny. It's grown a lot in the last year or so and I am really impressed with the quality, considering it's not the owners full time job or anything.

Misc.

Joi Ito - Personal blog of Joi Ito. I met him in Wellington, New Zealand at the ICANN conference. Very nice guy and a hugely successful internet entrepreneur. He has invested in so many "name brand" blogging and Web 2.0 startups that it would make your head spin.

Matt Maroon - Former professional poker player turned Web 2.0 founder. I read this blog mainly because his posts are very refreshing. He has a style that's all his own for sure.

iJustine - I met Justine when she came in to LA and hung out with us at Groovr. She's a sweet heart but when that camera is off, and she's had a shot or two, well.. She's still a sweet heart. Her blog doesn't have much other than her crazy videos, etc. Good for a quick laugh.

That's about it. My list changes pretty often, but right now these are what I am reading. Most of these I have read for some time and don't plan on abandoning any time soon.

Am I missing any thing that you consider a MUST read? I happily accept recommendations.

Technorati Tags: , , ,

Posted by Peter Sanchez in geek, internet marketing, politics, technology, writing 5 comments
 

Beating Up 5 Year Old Kids..

Monday, December 17, 2007 - 11:30 AM

This is just great. What's YOUR score?


25

Technorati Tags: , ,

Posted by Peter Sanchez in geek, general, life 0 comments
 

PostgreSQL Wrapper Using Python And PyGreSQL

Friday, September 14, 2007 - 5:47 PM

Ever wanted a nice, clean or sexy interface when working with Python and PostgreSQL? You're in luck, I happen to own one. I wrote this a year or so ago and it's been through some changes but overall it works very well. It is in use over at AhCabron (NSFW) and has been performing great for the site, which pulls 8M+ page views per month (I know, that's not a HUGE amount of traffic, but it's respectable).

Of course, for web work with Python I strongly recommend Django! But there are still plenty of other reasons why you need to hit a db outside of Django. That's where my module comes in.

It uses the PyGreSQL PostgresSQL module. This is the actual glue for Python to PostgreSQL. My module is what makes your programming super simple. So here it is, I am releasing it to the wild and under the BSD License. Do with it what you will.. Download it here

Here is an example of how to use it.. Very simple.


from sql import *

try:
sql = PgSQL('dbuser', 'dbpass', 'dbhost', 'dbport')
sql.Connect('dbname')

query = 'SELECT * FROM table WHERE "foo"=\'?\' and "bar"=\'?\''
sql.Prepare(query, (var1, var2)) # Prepare takes 2 items only. a query and a tuple (or single object)
sql.Execute()

for x in xrange(sql.rows):
print sql.data[x][0] # Column count here

sql.Close()
except SQLError, err:
print 'Caught err: %s' % (err)

Pretty self explanatory. If you have questions, check out the source. It's not a large module and pretty easy to follow. If you still have issues, feel free to email me. Upon any error, the exception it will raise is SQLError. I thought about adding more specific exceptions, but in the end, is it really necessary?

So there you go. Enjoy!

Technorati Tags: , , , ,

Posted by Peter Sanchez in geek, general, technology 0 comments
 

The New Groovr!

Tuesday, August 28, 2007 - 5:29 PM

As you know, I work at Groovr. Well last night we launched the new version of the site. This includes a complete rewrite of the software that powers the site and a brand spankin' new design. The site still runs on Python + Django and was given lots more functionality. The real killer part is the iPhone app! Just head to www.groovr.com on your iPhone and you will be automatically placed in the iPhone app. Oh and we aren't done. We still have a list of features that will be slowly rolled out into the wild. You should definitely check it out!

There have been a few articles written about the new site already. Read these too!

[Update: Added more articles above.. 8/29/2007]

Technorati Tags: , , , , , ,

Posted by Peter Sanchez in business, geek, news, technology 0 comments
 

Django + Flatpages = WTF?

Sunday, August 19, 2007 - 8:53 AM

OK, the title is a little misleading. I love the flatpages. I recently deployed them on this blog for the about and contact pages and they were working fine. This morning I noticed that they were raising a 404 (Page Not Found) error. That's where my "WTF" in the title comes in. Here is a check list to solve this flatpage issue.


  1. Add the middleware and app as directed on the flatpages documentation page.

  2. Make sure you have the correct SITE_ID in settings.py and make sure the flatpage is assigned to that site.

  3. Check that you have flatpages/default.html in one of your template paths.

  4. Verify that your default.html template is extending the correct base template

Number 4 was my problem. I have been working on the code to allow multiple template sets to be selected in the admin interface. In doing that, I re-factored the base layout to be in template/base/base.html but the default.html was still extending base_blog.html. Doh!

I wish there was something logged somewhere though that would let me know there was an error rendering the flatpage. The 404 was pretty cryptic.

Technorati Tags: , , , ,

Posted by Peter Sanchez in geek, general, technology 0 comments
 

iPhone Hacking

Thursday, August 9, 2007 - 7:40 AM

I've had my iPhone for about a week now. There are a few things about it I dislike. I mean, I thought Maddox was joking when he said there was no copy & paste functionality on the phone. Also, as of yet, there are no custom ringtones and the apple provided tones made me want to wear ear muffs every time the phone rings. Those few things aside, I love the phone. Was it worth the $600 price tag? Come see me in a month, but today I am saying yes!

So, what is one of the first things you do to a brand new and very expensive gadget? Hack it of course! I found a website called Hack The iPhone and started reading. A lot of the website is actually out of date. It says you need jailbreak & iPhoneInterface (both are CLI programs to interface with the iPhone). Both of which still work (I used them) but I found out that iPhoneInterface has been replaced with iPHUC. A great site, that is fairly current, is the iPhone dev wiki. Check here for updates on the progress of the iPhone deconstruction.

How did I hack the iPhone? Well, I got sshd running with scp/sftp-server support. I can SSH into my iPhone anytime I am connected via WiFi. This also means I can scp over custom ringtones! I use GarageBand to take an mp3 file, cut into the ringtone and export it to m4a format that the iPhone uses for it's ringtones.

The tutorial for getting sshd running is found here. Remember that iPhoneInterface was replaced with iPHUC. To build iPHUC, you will need xCode installed. If you don't have much, or any, UNIX CLI experience, than this may not be something you want to play with right now. Wait a bit, it's only a matter of time before these processes are automated. I will probably write up an updated tutorial soon and post it. If you need more help, stop by #iphone on irc.osx86.hu.

I should mention that I tried all this in OS X, I have no clue how to go about any of this on a windows box. I do know it's possible though, just not sure of the extra hurtles you need to jump. Good luck!

Technorati Tags: , , ,

Posted by Peter Sanchez in geek, general, technology 0 comments
 

iPod Security

Thursday, July 19, 2007 - 4:01 PM

Ever had your iPod stolen or "Pod Jacked"? Well my 30G black iPod was stolen out of an MGM Grand hotel room a few weeks ago. I didn't notice it missing from my bag until I had gotten home. To late to do anything about it! I went searching for iPod security products, but found nothing.

Enter Hide A Pod! This was passed along to me today. It is the ultimate product to secure your iPod or new iPhone. I am still trying to get mine ordered, but there appears to be issues with the Microsoft servers. I will keep trying. I wish I would have found this a month ago, I would have saved a few hundred bucks!

Hide A Pod

Technorati Tags: , , , , ,

Posted by Peter Sanchez in geek, general, life, technology 0 comments
 

Ping Technorati from your Django App

Saturday, July 14, 2007 - 9:39 AM

There are other articles written about this, but I felt the need to write a better one. Ahem.

Meat and potatoes time.

In your settings.py file, set 2 new variables:


# 'PING' blog indexing sites.
PING_BLOG_INDEX = True

# List of blog index ping URL's
BLOG_INDEX = ['http://rpc.technorati.com/rpc/ping',
'http://blogsearch.google.com/ping/RPC2',
'http://rpc.weblogs.com/RPC2']

PING_BLOG_INDEX is self explanatory. BLOG_INDEX is a list of blog XMLRPC url's that this application is going to use to notify the remote website (blog indexer) that your blog has been updated.

Let's create a new file in your blog application directory and name it ping.py. This file will hold the code that actually pings the blog indexers. Here it is:


from django.conf import settings

def pingSites(entry, blog_name):
for site in settings.BLOG_INDEX:
try:
rpc = xmlrpclib.Server(site)
try:
p = rpc.weblogUpdates.extendedPing(blog_name,
settings.SITE_URL,
entry.get_absolute_url(),
settings.SITE_URL + '/feeds/rss2'
)
except:
# May not support extendedPing()
# Try normal ping
p = rpc.weblogUpdates.ping(blog_name,
settings.SITE_URL)

if p.has_key('flerror') and p['flerror'] == True:
errlog(p['message'])
except:
errlog('pingSites: %s, exception!' % (site))

A few notes on the above code:


  1. errlog() is a function I have that just logs errors via syslog for my review. If you don't want to track the errors then a simple "pass" will do. I am just anal about errors and like to follow them. Heh, I said anal.

  2. This code assumes 2 things. One is that you have a "SITE_URL" option in your settings.py file. It should just be something like "SITE_URL = 'http://www.petersanchez.com'". And two is that your "Entry" model (the model that stores your blog posts) has a "get_absolute_url()" method. If it currently doesn't, I have to ask: What's wrong with you? Add one!

  3. You probably need to change the '/feeds/rss2' line to match the URL for your own RSS feed. Don't have an RSS feed on your blog yet? Write one, its super simple. Doc's are here.

Now lets edit your blogs models.py file be sure to import the pingSites() function that we just created in ping.py.


from your_project.blog.ping import pingSites

In your "Entry" model (mine is named "Entry", your mileage may vary) create a custom save() function.


def save(self):
# Save first, ping second (if configured)
super(Entry, self).save()
if settings.PING_BLOG_INDEX:
blog = Blog.objects.all()[0]
pingSites(self, blog.name)

Notes on above code:


  1. The 'blog' variable used in my example is because the software I wrote supports multiple blogs from a single installation. If you don't have a similar setup, just remove the "blog = Blog...." line and replace "blog.name" with the name of your blog. For example: pingSites(self, 'Joe Blow Blog')

That's it. You should be good to go. Next time you update your blog the blogosphere will immediately know about it via the blog indexers.

Technorati Tags: , , , ,

Posted by Peter Sanchez in geek, general, technology 4 comments
 

Facebook Privacy and Policies

Friday, June 22, 2007 - 9:29 AM

Like a whole lot of other people, I have a Facebook account. I don't use it very often, but it is a nice site and I prefer it over MySpace any day of the week. I ran across this video that was posted on GNUCitizen blog this morning. It claims that Facebook has ties to the CIA, DoD and the IAO. It asks the question:

Does what happens in the Facebook stay in the Facebook?

GNUCitizen posting is here

Technorati Tags: , , ,

Posted by Peter Sanchez in business, geek, technology 0 comments
 

MacBook Woes

Wednesday, June 20, 2007 - 7:46 PM

After years of defending Apple products, my 6 month old MacBook has decided to take a dump on me. Take that last part any way you please... Anything for humor. Anyways, the battery would no longer charge. The status light on the magna plug no longer gave any indication either. No more amber or green colors for me to let me know what the hell was going on! I tried resetting the "PMU" as well as some other tricks, but nothing worked.

In the end, the Genius at the Genius Bar took a shot and got no further than I did. Locked up the MacBook on a 3-5 day sentence. Hopefully when I get it back I can continue to boast about the quality of Apple gear. Honestly, it would take a lot to get me to give up OS X and go back to a FreeBSD workstation.

Technorati Tags: , , ,

Posted by Peter Sanchez in geek, life, technology 0 comments
 

Black Hat Hackers Own Us!

Wednesday, June 13, 2007 - 5:16 PM

The Register has an interesting article about black hat hackers. It contains a list of 10 reasons why the black hats have us "outgunned" Snippet:


1. The Black Hats form a well integrated community that shares knowledge effectively.

Should you, after months of research and effort, create an exploit that allows you to hack Windows or any other frequently used software product, you can auction the exploit on the internet in a well organised manner. Yes, the hackers have their own auction sites (it's true). And if you're looking to write a virus, say, well, there are hundreds of sites out there that can provide you with source code to help you construct something really fiendish. Different modules for setting up a mail server or planting a specific Trojan or whatever. Open source is all the rage, even among hacker

5. There's a market for your data

"OK, I go out onto the net and try an exploit here or there and I hit pay dirt - a whole file of thousands of credit card details. What do I do now?" My advice to you dear boy, is forget about trying to buy stuff on eBay or Amazon with all that stolen data. Simply sell the data and leave it to someone else to do all the dirty work. How much to sell for? Well it depends, but you should be able to get $30 per credit card as an absolute minimum and if you've got really lucky and managed to get the PIN number of the card (a difficult data item to get your hands on) then it should be close to $500 per card. Yes, there are markets out in cyberspace where you can sell data - not just credit card data, but Social Security Card data (for US citizens), birth certificate data, billing data, and driving license data (all of which can be used to set up bogus bank accounts).

6. There are botnets to rent

Don't tell me, let me guess. You've got a great scheme in mind to flood the world with a particular kind of spam and it's bound to pay off. But you just don't have the computer power you need. Let me introduce you to an Asian friend of mind who's been established in the Black Hat trade for a year or two. He repeatedly floods the internet with Trojan viruses to continuously assemble and grow a botnet. He has to keep on doing it because every now and then PCs get cleaned and fall out of the net and anyway the bigger the botnet the more the commercial opportunity. My friend will rent you a portion of his botnet for 20 cents per PC per day (roughly current rates) and he'll throw in a whole database of email addresses too. He thinks of himself as an Internet Service Provider.

10. Not all businessmen are entirely averse to the odd hack (on a competitor)

As you seem determined to embark on a life of cybercrime I have one last piece of advice for you. Don't ignore the business world as a lucrative source of income. I know what you're thinking. Those guys are my prey. Well it's true that some of them are, but some of them could become your customers - if you make the right contacts and do the right kind of marketing. I mean, which businessman could fail to be pleased when his major competitor suffers a big data hack or loses a few days web business because of a DOS attack. Which businessman doesn't think, "hey what if I arranged for something like that to happen?" And which businessman having formulated a good competitive tactic doesn't put it into practice. There's good money to be made in focused hacks, theft of intellectual property, denial of service and large scale data theft. You might even get paid twice - by the customer and the victim.

Apparently, it's the end of the world as we know it. The sky is falling... No really!

Seriously, identify theft has become such a major threat to the average consumer. Dealing with it can take years to straighten out and your credit may never be the same. E-Tailers need to take more precautions when dealing with customer data. I have worked at companies that retain quite a bit of user information and while their practices were decent, most needed to do more. I pointed it out, and usually action was taken... But not always!

Tsk Tsk.

Technorati Tags: , , , ,

Posted by Peter Sanchez in business, geek, news, technology 0 comments
 

Django, metaWeblog and Amazon S3

Wednesday, June 6, 2007 - 11:11 AM

This is a quick write up about adding support for Amazon S3 to your Django weblog. I added support for metaWeblog API by using the this write up from All Your Pixel. Most, if not all, blogging clients support the metaWeblog API so I think it was a good choice.

Why use Amazon S3?


  • It's super cheap (probably cost you less than $1/mo)

  • Performance is improved by moving static media away from your Django/Apache instance.

  • Amazon worries about managing and scaling the storage back end.


First off, let's edit the settings.py that is in your Django project's directory. We will want to add your Amazon access information. Note: You can get your access information by signing up for S3 at the Amazon site. Add the following to your settings.py file:

AWS_ACCESS_KEY = 'Your Key'
AWS_SECRET_ACCESS_KEY = 'Your Secret Key'
BUCKET_NAME = 'Your Bucket Name'
AWS_S3_URL = 'http://s3.amazonaws.com'

So, I am going to assume you are using the xmlrpc.py and metaweblog.py that was provided in the All Your Pixel posting (linked above). Be sure you are importing the Django project settings file by using:

from django.conf import settings

This will also require the Python S3 module that is provided by Amazon. Get this file and add it to your project, or your Python path. Import that module, and the mimetypes module which is used to guess the type of the file being uploaded.

from yourproject import S3
import mimetypes

Now we will create, or edit, the metaWeblog_newMediaObject method. This is what is called when your blogging client attaches, or uploads, a media file to your blog post.

def metaWeblog_newMediaObject(user, blogid, struct):
ret = {}
fext = os.path.splitext(struct['name'])[1].lower()
fname = generate_fname() + fext
try:
conn = S3.AWSAuthConnection(settings.AWS_ACCESS_KEY,
settings.AWS_SECRET_ACCESS_KEY)
buckets = conn.list_all_my_buckets()
if not settings.BUCKET_NAME in [b.name for b in buckets.entries]:
# BUCKET_NAME doesn't exist, create it!
res = conn.create_bucket(settings.BUCKET_NAME)
if res.http_response.status != 200:
raise
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
while res.http_response.status == 200:
# File exists, generate new filename
fname = generate_fname() + fext
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
content_type = mimetypes.guess_type(filename)[0]
if not content_type:
content_type = 'text/plain'
res = conn.put(settings.BUCKET_NAME,
filename,
S3.S3Object(struct['bits'].__str__()),
{'x-amz-acl': 'public-read',
'Content-Type': content_type}
)
if res.http_response.status == 200:
ret['url'] = '%s/%s/%s' % (settings.AWS_S3_URL,
settings.BUCKET_NAME,
filename)
except:
pass
return ret

I should mention that the method generate_fname(), which is used above, is just a function to generate a MD5 hash which will be used as a file name of the new file being added. It is not required, but you may want to use something similar. A quick run down of what this code does:

1 - Generates a file name to use.
2 - Creates an S3 instance.
3 - Gets a list of all your S3 buckets.
4 - Checks to see that the bucket you want to use exists. If not, it creates it.
5 - Checks to see if the file already exists. If so, it generates a new file name.
6 - Guesses the file type.
7 - Uploads the file to S3.
8 - Returns the file URL to your blogging client.

That's it! There are a few other articles written about this. Check them out as well!

Technorati Tags: , , , , ,

Posted by Peter Sanchez in geek, technology 1 comments
 

The iPhones Are Coming!

Tuesday, June 5, 2007 - 8:50 AM

Since the announcement of the Apple iPhone, the tech community has been a buzz with chatter. I saw one of the TV Ads the other day and got a little excited (read into that what you will). The phones are set to be available on June 29th, a mere 24 days away! I have to think that this will change the mobile phone business in some form. Probably not in the way that the iPod effected the music business, but I am sure it will change for the better.

There are drawbacks however. Mainly that the phone will be limited to use with the AT&T wireless service. A lot of people currently tied to contracts with other services will be wondering if it's worth it. Is it worth the cost of the current termination penalty? I think I pay $150 with T-Mobile, PER LINE (I have 3 lines!) Maybe I can finagle the deal to leave my wife & daughter on T-Mobile while I head over to iPhone bliss? Even if that's possible, the low end model of the iPhone is $499. That's a lot of green backs! Plus general service costs, etc. I can be looking at nearly $1000 to make the move.

Let's see... Overhaul my motorcycle... Or new iPhone??? Which one will turn more heads? Probably the iPhone.

When they do come out, I will probably sit and wait a few months so that any glitches, and there will be glitches, can hopefully get worked out. If you are one of the wild ones, and feel like sharing, please let me know how you like the phone. I am very interested to see how this one turns out!

Technorati Tags: , , , , ,

Posted by Peter Sanchez in business, geek, news, technology 0 comments
 

500 Internal Server Errors

Saturday, June 2, 2007 - 7:09 PM

Woooooops =) In my haste last night, I accidently added a change that wasn't completed yet, and it effected individual post views. The result was an Internal Server Error, it was related to the comment form. Sorry about that, and thanks for the emails letting me know there was an issue.

Just need to remember to test as much as possible before taking newer code live. I mean it really isn't that big of a deal as this is just a personal site, but still the habit should be in place.

Technorati Tags: , , ,

Posted by Peter Sanchez in geek, general, life 0 comments
 
<< Older Posts   Newer Posts >>