Public Gists by jpemberthy

Gravatar
Mon Nov 30 17:13:55 -0800 2009
1
/castsequence reset=10 holy shield, hammer of the righteous, shield of righteousness
Gravatar
Mon Nov 30 06:57:56 -0800 2009
1
2
3
---
- Teams
- SBGGLOBAL.com
Gravatar
Thu Nov 26 13:02:31 -0800 2009
1
2
3
>> Group.find(:all, :limit => 2)
+----+-------------+------------------------+------------------------+-------------------+-------------+-----------------+------------------------+
| id | name | created_at | updated_at | memberships_count | pools_count | privacy_settin
Gravatar
Wed Nov 25 12:42:16 -0800 2009
1
2
3
  # group activity based on pools creation.
  def activity_chart_for(group)
    image_tag(Pool.activity_since(6.months.ago, :group_by => :week, :conditions => "pools.group_id = #{group.id}").to_activity_gchart(:type => :line, :line_color => "FF2700"))
Gravatar
Tue Nov 24 12:58:24 -0800 2009
1
2
  named_scope :recent_greatest, :joins => { :pool => :schedule }, :conditions => "schedules.ends_at BETWEEN (CURDATE() - INTERVAL 7 DAY) AND CURDATE()", :order => "hits DESC"
  named_scope :recent_greatest, :joins => { :pool => :schedule }, :conditions => "schedules.ends_at BETWEEN #{1.week.ago.to_d
Gravatar
Tue Nov 24 06:19:45 -0800 2009
1
2
3
#FB publish stream when
 
1. User connects with the app.
Gravatar
Mon Nov 23 12:29:57 -0800 2009
1
2
3
#fbooker publish samples.
 
u.publish_to(u, :action_links => [ :text => 'rockingshark.com', :href => 'http://rockingshark.com' ] )
Gravatar
Mon Nov 23 08:43:20 -0800 2009
1
2
3
  def create
    @user_session = UserSession.new(params[:user_session])
    if @user_session.save
Gravatar
Mon Nov 23 08:37:44 -0800 2009
1
2
3
module AuthlogicFacebookConnect
  module Helper
    def authlogic_facebook_login_button(options = {})
Gravatar
Tue Nov 17 08:11:50 -0800 2009
1
2
3
<h2 class="employees"><r:employee:kind /></h2>
<p><span class="bold"><r:employee:name />.</span> <em><r:employee:title /></em> <br/>
<img alt="<r:employee:first_name />" src="<r:employee:profile_thumbnail_filename />" />
Gravatar
Tue Nov 17 08:10:08 -0800 2009
1
2
3
<h2>Management & Office Staff</h2>
<ul class="employees">
  <r:employees:collection container="list" order="show_order" employee_type="managers">
Gravatar
Tue Nov 17 08:08:31 -0800 2009
1
2
3
<h2>Management & Office Staff</h2>
<ul class="employees">
  <r:employees:collection container="list" order="show_order" employee_type="managers">
Gravatar
Mon Nov 16 13:17:06 -0800 2009
1
2
3
  context "A PoolEntry Instance" do
    setup do
      load_factory_dataset
Gravatar
Mon Nov 16 13:03:28 -0800 2009
1
2
3
  def setup_pool
    add_games
    setup_results
Gravatar
Thu Nov 12 17:00:12 -0800 2009
1
2
3
The basic unit of work in the Pomodoro Techniqueâ„¢ can be split in five simple steps:
 
1. Choose a task to be accomplished
Gravatar
Thu Nov 12 15:19:40 -0800 2009
1
2
3
require File.dirname(__FILE__) + '/../test_helper'
 
class PoolEntryTest < ActiveSupport::TestCase
Gravatar
Thu Nov 12 11:05:36 -0800 2009
1
2
3
>> p = Pool.first
+----+------+----------+---------------------------+---------------------------+--------------------+-------------+-------------+
| id | name | group_id | created_at | updated_at | pool_entries_count | picks_count | schedule_id |
Gravatar
Tue Nov 10 13:44:40 -0800 2009
1
@pickset = @user.picksets.find(:first, :include => { :picks => [ :team, { :game => [:local, :visitor, :winner] }, { :pool_entry => { :game => :results } } ] }, :conditions => { :pool_id => @pool.id })
Gravatar
Tue Nov 10 11:58:53 -0800 2009
1
2
mysql> SELECT * FROM tbl_name WHERE col1=val1 AND col2=val2;
If a multiple-column index exists on col1 and col2, the appropriate rows can be fetched directly. If separate single-column indexes exist on col1 and col2, the optimizer will attempt to use the Index Merge optimization (see Section 7.2.6,
Gravatar
Tue Nov 10 11:42:03 -0800 2009
1
2
3
 Full table scan
No index was used here. In this case, that meant scanning 5 rows.