Skip to content

Instantly share code, notes, and snippets.

View dustinsmith1024's full-sized avatar
🏀
⛹️

Dustin Smith dustinsmith1024

🏀
⛹️
View GitHub Profile
@dustinsmith1024
dustinsmith1024 / heroku_commands.txt
Created February 17, 2012 01:19
Heroku Setups Custom Domains
Links:
http://devcenter.heroku.com/articles/custom-domains
http://joshkim.org/2010/03/15/custom-domain-names-on-heroku-via-namecheap/
Run the heroku commands to add custom domains
$ heroku addons:add custom_domains:basic
Adding custom_domains to myapp...done.
$ heroku domains:add www.example.com
@dustinsmith1024
dustinsmith1024 / gist:1686977
Created January 27, 2012 04:24
Installing Janus VIM on fresh Ubuntu
curl -Lo- http://bit.ly/janus-bootstrap | bash
#errored out...had to install git first, derrr
sudo apt-get install git
curl -Lo- http://bit.ly/janus-bootstrap | bash
# error! had to install rake next
sudo apt-get install rake
curl -Lo- http://bit.ly/janus-bootstrap | bash
@dustinsmith1024
dustinsmith1024 / gist:1538333
Created December 30, 2011 06:51
JQuery disabling buttons
//jQuery UI Button:
$("a.my-button" ).button({ disabled: true });
//Normal Button:
$("#button").attr("disabled",true);
@dustinsmith1024
dustinsmith1024 / gist:1538180
Created December 30, 2011 06:03
Radio Inputs in Django that don't have LABEL wraps
"""
1. Inherit from the normal RadioInput and copy the RadioInput __unicode__ method. Then change it up how you please:
"""
class RadioInputNoWrap(RadioInput):
def __unicode__(self):
if 'id' in self.attrs:
label_for = ' for="%s_%s"' % (self.attrs['id'], self.index)
else:
label_for = ''
choice_label = conditional_escape(force_unicode(self.choice_label))