Skip to content

Instantly share code, notes, and snippets.

View pbonnell's full-sized avatar

pbonnell pbonnell

View GitHub Profile
2011-06-29T02:26:17+00:00 app[web.1]: Geokit::TooManyQueriesError (Google returned a 620 status, too many queries. The given key has gone over the requests limit in the 24 hour period or has submitted too many requests in too short a period of time. If you're sending multiple requests in parallel or in a tight loop, use a timer or pause in your code to make sure you don't send the requests too quickly.):
2011-06-29T02:26:17+00:00 app[web.1]: app/models/member.rb:147:in `geo'
2011-06-29T02:26:17+00:00 app[web.1]: app/controllers/application_controller.rb:38:in `gmap'
2011-06-29T02:26:17+00:00 app[web.1]: app/controllers/home_controller.rb:14:in `index'
@pbonnell
pbonnell / notices_controller_spec.rb
Created June 24, 2011 20:33
this fails @ l.5 in SPEC ONLY - on dev/browser record after .save is identical to a dump in the test
it "should create a new notice", :real_db => true do
@_before = Admin::Notice.count
post :create, @post_params
Admin::Notice.should_receive(:create).with(@post_params).and_return(1)
Admin::Notice.count.should == @_before + 1 #<= FAILS HERE ?
response.should redirect_to('/admin/notices/info')
end
# SPEC FAIL :
# Failure/Error: Admin::Notice.count.should == @_before + 1
@pbonnell
pbonnell / template_wrapper_initializer.rb
Created March 28, 2011 19:24
rake installed initializer for template_wrapper gem
# install me : {Rails.root}/config/initializers/template_wrapper_initializer.rb
if defined?(TemplateWrapper)
## ALL VALUES HERE ARE DEFAULTS IF INITIALIZER IS NOT PRESNT
TemplateWrapper.default_rendering = :full
# :full (icon & text) || :icon (only) || :comment (wraps patial in source comments only) || :blank (do nothing)
TemplateWrapper.image_src = "http://circuitllc.com/template_wrapper/images/ruby_next.png"
# feel free to grab this from the circuit box for local serve, or use whatever you wish...
# => more images :
TemplateWrapper.href = {:link =>"NOT_IMPLEMENTED", :class => 'template_wrapper_link'}
@pbonnell
pbonnell / template_wrapper_initializer.rb
Created March 28, 2011 19:24
rake installed initializer for template_wrapper gem
# install me : {Rails.root}/config/initializers/template_wrapper_initializer.rb
if defined?(TemplateWrapper)
## ALL VALUES HERE ARE DEFAULTS IF INITIALIZER IS NOT PRESNT
TemplateWrapper.default_rendering = :full
# :full (icon & text) || :icon (only) || :comment (wraps patial in source comments only) || :blank (do nothing)
TemplateWrapper.image_src = "http://circuitllc.com/template_wrapper/images/ruby_next.png"
# feel free to grab this from the circuit box for local serve, or use whatever you wish...
# => more images :
TemplateWrapper.href = {:link =>"NOT_IMPLEMENTED", :class => 'template_wrapper_link'}
@pbonnell
pbonnell / AR updating in a migration!?
Created February 3, 2011 19:58
code runs fine in console, FAILS to update inside a migration
# drop this on console :
@new_names = {
"1" => {:label => "super_admin",:nicename => "Super Admin"},
"2" => {:label => "admin", :nicename => 'Admin'},
"3" => {:label => 'editor' , :nicename=>'Editor'},
"4" => {:label => 'columnist', :nicename => "Columnist"},
"5" =>{:label => 'guest', :nicename => "Guest"}
}
~/p# git clone git@heroku.com:premier-demo.git LocableDemo
Initialized empty Git repository in /Users/pb/p/LocableDemo/.git/
remote: Counting objects: 7378, done.
remote: Compressing objects: 100% (6136/6136), done.
remote: Total 7378 (delta 4193), reused 2286 (delta 732)
Receiving objects: 100% (7378/7378), 4.91 MiB | 297 KiB/s, done.
Resolving deltas: 100% (4193/4193), done.
~/p# cd LocableDemo
LocableDemo[master]/# git remote add core git@github.com:brianmba/LocableCore.git
LocableDemo[master]/# git remote show core
LocableCore[master]/# git remote add heroku git@heroku.com:premier-demo.git
LocableCore[master]/# git pull heroku master
warning: no common commits
^CKilled by signal 2.cts: 406
<a class="rpxnow" href="https://janrain-engage-demo.rpxnow.com/openid/v2/signin?token_url=my%2Freturn%2Furl">Janrain( put a nice icon here)</a>
<script src="https://rpxnow.com/openid/v2/widget" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[

RPXNOW.token_url = 'my/return/url';
RPXNOW.realm = 'janrain-engage-demo';
RPXNOW.overlay = true;
 
 
 

//]]>

</script>

hylo_harris[master*]/# heroku db:pull
Loaded Taps v0.3.14
Auto-detected local database: mysql://root@localhost/premier_harris?encoding=utf8
Warning: Data in the database 'mysql://root@localhost/premier_harris?encoding=utf8' will be overwritten and will not be recoverable.
! WARNING: Potentially Destructive Action
! This command will affect the app: harris
! To proceed, type "harris" or re-run this command with --confirm harris
> harris
file: _upload_params.json.erb
{
"auth": {
"key": "4d24e398cd344661a27f47f172ec3211"
}
, "template_id": "4d24ef08014047129610498c72ec3211"
, "steps":{
"export_thumb":{ "path": "peter_test/images/thumb/${file.original_id}_${file.urlName}"}
}
,"redirect_url":"/admin/galleries/upload/7"