[ Launch Inlet ]Gist #2958196 No Previous Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function chooseGraphFromTypes(omm, influencer) { | |
| if (omm == 'nominal' || influencer == 'nominal') { | |
| return "none"; | |
| } else if (omm == 'interval' && influencer =='interval') { | |
| return "interval_interval"; | |
| } else if (omm == 'number' && influencer == 'number') { | |
| return "numerical_numerical"; | |
| } else if (omm == 'ordinal' && influencer == 'ordinal') { | |
| return "ordinal_ordinal"; | |
| } else if( omm == 'interval' && influencer == 'number') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! jQuery v1.8.3 jquery.com | jquery.org/license */ | |
| (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,funct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| top | |
| window | |
| location | |
| external | |
| chrome | |
| v8Intl | |
| document | |
| $ | |
| jQuery | |
| CTIsPlayback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def show | |
| params[:page] ||= 1 | |
| @user = User.find_by_username!(params[:id].downcase) | |
| @artworks = @user.artworks.paginate(:page => params[:page], :per_page => 10).recent | |
| users_likes_ids = [] | |
| if signed_in? | |
| artwork_ids = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - tutorial = @tutorial || Tutorial.new | |
| = simple_form_for tutorial do |f| | |
| = f.input :title, input_html: { class: 'span4' } | |
| = f.input :url, label: 'URL', input_html: { class: 'span4' } | |
| = f.input :description, as: :text, input_html: { class: 'span4' } | |
| = f.submit "Add New Tutorial", class: 'btn btn-success' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Whatever < ActiveRecord::Base | |
| before_validation :smart_add_url_protocol | |
| validates_format_of :url, | |
| :with => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, | |
| :message => "URL should be in this format: http://google.com" | |
| private | |
| def smart_add_url_protocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias gcb='git checkout -b' # Check out a new branch | |
| alias hack='bash ~/hack.sh' # Hack on the branch | |
| alias ship='bash ~/ship.sh' # Ship the feature | |
| alias dwf='bash ~/dwf.sh' # Delete the working feature | |
| alias hsd='hack && ship && dwf' # Hack, ship, delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rails' | |
| require 'spec_helper' | |
| require 'generator_spec/test_case' | |
| require 'generators/kaleidoscope/kaleidoscope_generator' | |
| describe 'TestMigration' do | |
| include GeneratorSpec::TestCase | |
| destination File.expand_path("../tmp", __FILE__) | |
| arguments %w(photo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Kaleidoscope | |
| module InstanceMethods | |
| def colors_for | |
| end | |
| def generate_colors | |
| Kaleidoscope.log("Generating colors.") | |
| end | |
| def destroy_colors |