Andrew McCloud

  • Random
  • Archive
  • RSS

How To Split Amazon Payment Between Two Credit Cards

In the process of purchasing all the new goodies for my new place I decided now would be a good time to exercise a line of credit through Amazon. Unfortunately Amazon gave me a lackluster credit limit that only covers about 1/4th of my carts total.

I now need to split the payment across two payment methods. The credit card issued by Amazon and my Visa debit card. This is problematic because while Apple’s online store offers a way to do this, Amazon does not. Fear less, I’ve figured out a simple way around this limitation – Amazon’s Gift Cards.

image

Purchase an Amazon Gift Card with one payment source. In my case I purchased a gift card with my Visa debit card.

You can purchase your Amazon gift card here:

http://www.amazon.com/gp/product/B004LLIKVU/?tag=amz-gift-card-20

Select the email gift card, set the amount, and send the gift card to yourself. You will be emailed a code. Copy that code as we will use in the next step.

  • This is not limited to two payment sources. You can purchase a gift card with each payment source you have.
  • It appears $2,000 is maximum gift card amount you can purchase.
  • It can take up to 15 minutes to receive the gift card.

Now that you have your gift card code, when you go to select the payment options for your cart you’re able to select a primary payment source – in my case my Amazon credit card.

Then input all of your Amazon gift card codes as secondary payment source.

image

That’s all there is to it. Hope this hack helps other!

    • #amazon
    • #hack
  • 1 week ago
  • Comments
  • Permalink
  • Share
    Tweet

Django 1.5 Custom User GeoManager

AttributeError: ‘GeoManager’ object has no attribute ‘get_by_natural_key’

Using geo fields on a Django model requires the use of GeoManager. Custom User models require an object manager that implements BaseUserManager.get_by_natural_key. If you’re trying to add geo fields to your custom User model you’ll need create a custom manager that mixes a user manager and GeoManager. Lucky us, this is a piece of cake!

http://gist.github.com/4291351

    • #django
    • #opensource
    • #python
  • 5 months ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Create Text & Online Versions of Emails Automatically

For this i’ve created django-firstclass. Firstclass is a proxy email backend for Django that allows for global email transformations such as automatically creating a plain text version of html emails or automatically creating an online version of the email that can be read in browser.

My goal was to have this be a drop in solution requiring no change to a code base. I also wanted this to be flexible enough so that it can work with a wide variety of projects. I accomplished this by adding a middleware pipeline to Django’s email process. I’ve bundled a few useful middleware in and plan to add a few more. Creating your own middleware is simple. Middleware is a single Python class that defines process_message.

For example if you wanted to create a middleware that would add a tracking pixel to all of your emails:

http://gist.github.com/3048960

You would then simply add TrackingPixelMiddleware to FIRSTCLASS_MIDDLEWARE.

https://github.com/amccloud/django-firstclass

    • #django
    • #python
    • #firstclass
    • #opensource
  • 10 months ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Currently 99% of All Backbone.js Apps Are Broken

Javascript and Backbone.js is an async world. This also means request are async. If you’re fetching results for a collection and blindly expecting your collection to match those results, showing them to a user – you’re gonna have a bad time.

Currently slow request can cause havok on the the state of your collections and models. Imagine this scenario: A user search for ‘javascript’ first and then ‘dom’. The ‘javascript’ search hangs so the user never got to see the results. They then search for ‘dom’ and that response comes in right away while the ‘javascript’ search is still pending. The user is presented with books on ‘dom’. The old ‘javascript’ request now responds. The collection and the users UI is abruptly changed to books on ‘javascript’. Not good! backbone-safesync tries to remedy this by aborting old request.

https://github.com/amccloud/backbone-safesync

Thanks to rpflo in #documentcloud for bringing this to light.

    • #backbonejs
    • #javascript
  • 1 year ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Backbone Bindings

When working with Backbone it is common to re-render a whole view when a model attribute has changed. We can do better than that. Inspired by bindings in Cocoa (iOS & Mac) applications, I’ve created a library that allows you to bind element properties to model attributes, with optional transformation in between. I wanted bindings to be as simple as Backbone.View.events.

http://gist.github.com/2691450

See it in action here: http://jsfiddle.net/T2MSu/3/

https://github.com/amccloud/backbone-bindings

    • #backbonejs
    • #javascript
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Backbone Dotattr

I’ve created a little utility for accessing deep attributes in Backbone.js models with dot-syntax.

http://gist.github.com/2663112

https://github.com/amccloud/backbone-dotattr

    • #backbonejs
    • #javascript
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

MSN Love for iChat 6.0 & Messages

iChat 6.0 / Messages + MSN Messenger

Apple has introduced a new service plugin system for connecting iChat 6.0, and now Mountain Lion’s Messages, to other IM networks like MSN, IRC, and iMessages. The folks over at BrainJuice have released an awesome plugin i’ve been using for a while that is in beta called Cocoon. For those interested in the technical details about the implementation of iChat and Messages service plugins see Apple’s documentation.

  1. Download the Cocoon MSN plugin
  2. Mount the DMG and follow the installation directions.
  3. Once installed open iChat or Messages Preferences go to the accounts tab and press the “+”.
  4. Select MSN under account type and enter your MSN username and password.
  5. Click done and you’re all set. You should see your MSN account added to your Accounts list and a section appear in the main buddy list window.
  6. Bonus! There is also an IRC plugin that you can install.
    • #ichat
    • #messages
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

TextMate 2 Bundle Directory

TextMate 2 bundle directory
TextMate 2 alpha has been released but where is the TextMate 2 bundle directory?
~/Library/Application Support/Avian/Bundles/

The application support directory has been renamed so that it does not interfere with TextMate 1 bundles. From my testing (not absolute) TextMate 1 bundles work with TextMate 2.

    • #textmate 2
    • #tips
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Quick Optional Model Fields Trick

This is just something I do now. It’s DRY, saves a few keystrokes, helps stay under pep8’s 79 character limit, and improves readability in my opinion.

http://gist.github.com/1526444

    • #django
    • #tips
  • 1 year ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Custom Facebook Chat Smileys! Rage Face, Domo Kun, and more!

It’s been revealed that you can use Facebook profile ids with brackets [[ ]] to show that profiles image in Facebook’s chat. For example the Poker Face profile - https://www.facebook.com/129627277060203 - take the id 129627277060203 and put it in brackets like so [[129627277060203]].

Here is a collection of a few profiles courtesy of Reddit. If you have more tweet them to me @amccloud and I will add them to the list. Copy and paste the number and brackets.
  • Poker Face [[129627277060203]]
  • Forever Alone [[227644903931785]]
  • OK Guy [[100002752520227]]
  • Me Gusta [[164413893600463]]
  • LOL Guy [[189637151067601]]
  • Fuck Yeah [[105387672833401]]
  • Problem? [[171108522930776]]
  • Yao-Ming [[218595638164996]]
  • Troll Face [[171108522930776]]
  • Are you kidding me? [[143220739082110]]
  • Not bad Obama [[169919399735055]]
  • Mother of god [[142670085793927]]
  • Cereal Guy [[170815706323196]]
  • Socially akward penguin [[98438140742]]
  • No [[167359756658519]]
  • Gentleman [[168040846586189]]
  • Challenge Accepted [[100002727365206]]
  • Domo Kun [[250128751720149]]
  • Pokeball [[236147243124900]]
  • Pikachu [[326134990738733]]
  • Spongebob [[334954663181745]]
  • Pedo bear [[148935948523684]]
  • Dark Letter A [[107015582669715]]
  • Dark Letter B [[116067591741123]]
  • Dark Letter C [[115602405121532]]
  • Dark Letter D [[112542438763744]]
  • Dark Letter E [[115430438474268]]
  • Dark Letter F [[109225112442557]]
  • Dark Letter G [[111532845537326]]
  • Dark Letter H [[111356865552629]]
  • Dark Letter I [[109294689102123]]
  • Dark Letter J [[115636698451811]]
  • Dark Letter K [[116651741681944]]
  • Dark Letter L [[115807951764667]]
  • Dark Letter M [[106596672714242]]
  • Dark Letter N [[108634132504932]]
  • Dark Letter O [[116564658357124]]
  • Dark Letter P [[111669128857397]]
  • Dark Letter Q [[107061805996548]]
  • Dark Letter R [[106699962703083]]
  • Dark Letter S [[115927268419031]]
  • Dark Letter T [[112669162092780]]
  • Dark Letter U [[108983579135532]]
  • Dark Letter V [[107023745999320]]
  • Dark Letter W [[106678406038354]]
  • Dark Letter X [[116740548336581]]
  • Dark Letter Y [[112416755444217]]

And for the holidays!


Copy and paste this:
[[106596672714242]] [[115430438474268]] [[106699962703083]] [[106699962703083]] [[112416755444217]]                                        [[115602405121532]] [[111356865552629]] [[106699962703083]] [[109294689102123]] [[115927268419031]] [[112669162092780]] [[106596672714242]] [[107015582669715]] [[115927268419031]]

Also don’t forget to checkout custom Facebook timeline covers over at changecovers.com

    • #facebook
  • 1 year ago
  • 23
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 2

About

I make web.

Co-Founder of Pixelcloud.com
Django & Backbone.js consulting.

Me, Elsewhere

  • amccloud on Forrst
  • @amccloud on Twitter
  • Facebook Profile
  • Google
  • My Skype Info
  • amccloud on github
  • Xbox Live Profile
  • RSS
  • Random
  • Archive
  • Mobile

© 2011 Andrew McCloud. Effector Theme by Carlo Franco.

Powered by Tumblr