This file contains 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
To copy a file from a dropbox link: | |
1. Get the dropbox share link | |
ex: https://www.dropbox.com/s/pwc5te39av617yl/2013_mlb_batting_stats.txt | |
2. get the auth token by copying the direct download link (incognito) | |
https://dl.dropboxusercontent.com/s/pwc5te39av617yl/2013_mlb_batting_stats.txt?dl=1&token_hash=AAHAYm0X50m2TFAcnh2weDnY2YMZRu3jmnLnOxykE6QWIw | |
3. From console: | |
open('https://dl.dropboxusercontent.com/s/pwc5te39av617yl/2013_mlb_batting_stats.txt?dl=1&token_hash=AAHAYm0X50m2TFAcnh2weDnY2YMZRu3jmnLnOxykE6QWIw') do |player_stat| |
This file contains 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
<%= form_tag ({:controller => "position_game_stats", :action => "create"}), remote: true do %> | |
<%= file_field_tag "s3_image[image]" %> | |
<button class="btn fr" data-step="2" data-intro="Input your single game batting stats for your new Micard" data-position="left" type="submit"><i class="icon-check icon-white"></i> Submit</button> | |
<% end %> |
This file contains 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
<% raise (user.stackup.map { |friend| {tags: [:game]}.merge(PositionGameStat.formatted_total_row(PositionGameStat.where(user_id: friend.id), options.merge({override: {name: friend.full_name}}))) } + | |
user.mlb_stackup.map { |friend| {tags: [:game]}.merge(MlbBattingStat.formatted_total_row(MlbBattingStat.where(mlb_player_id: friend.id), options.merge({override: {name: friend.mlb_full_name}}))) } + | |
[{tags: [:highlight]}.merge(PositionGameStat.formatted_total_row(position_stats, options.merge({override: {name: user.full_name}})))]).inspect %> | |
=> | |
[{:tags=>[:game], :cells=>["kk kk", 37, 6, 0, 0, 0, 0, 0, 0, 0, ".162"]}, {:tags=>[:game], :cells=>["pp pp", 33, 16, 0, 0, 0, 0, 0, 0, 0, ".485"]}, {:tags=>[:game], :cells=>["Mike` Land", 0, 0, 0, 0, 0, 0, 0, 0, 0, "N/A"]}, {:tags=>[:game], :cells=>["Mike Adams", 0, 0, 0, 0, 0, 0, 0, 0, 0, "N/A"]}, {:tags=>[:game], :cells=>["Jeremy Affeldt", 0, 0, 0, 0, 0, 0, 0, 0, 0, "N/A"]}, {:tags=>[:high |
This file contains 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
1. goto apps/mailers and create mailer | |
2. create the template in Mailchimp | |
3. from MailChimp push to Mandrill through the browser | |
4. Add call ProStatsPullErrorReport.pro_stats_pull_error_report(mikepland).deliver |
This file contains 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 ChangeStackupStatusPlayers(stackup_number) { | |
$.ajax({ | |
type: "PUT", | |
url: "/stackups/" + stackup_number, | |
data: { stackup_status: false }, | |
dataType: 'script' | |
}) | |
// $('#stackup_button' + stackup_number).hide(); | |
//$('#stackup_button') |
This file contains 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
$ git branch -u origin/local_8 | |
Branch local_8 set up to track remote branch local_8 from origin. |
This file contains 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
# with just gamecard process - Motox under wifi | |
https://github.com/lando2319/micard/blob/5f20a64e8e7a541b5332e2a03a54bfdfd16989f4/app/uploaders/image_uploader.rb | |
2014-04-30T06:39:04.246845+00:00 heroku[router]: at=info method=POST path=/validate host=micard-staging.herokuapp.com request_id=d51b57c0-55af-4a6a-a678-3cb0eb63fe13 fwd="67.175.163.44" dyno=web.1 connect=2ms service=20ms status=200 bytes=589 | |
2014-04-30T06:39:04.242858+00:00 app[web.1]: Parameters: {"position_game_stat"=>{"at_bats"=>"55"}} | |
2014-04-30T06:39:04.242853+00:00 app[web.1]: Processing by ValidateController#check as JSON |
This file contains 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
s = "Testing this to see how much space I can use Testing this to see how much space I can use" | |
#grabs beginning of string by n characters with word boundaries | |
s[/^.{,45}\b/] | |
=> "Testing this to see how much space I can use " | |
#grabs end of string by n characters with word boundaries | |
s[/\b.{0,45}$/] | |
=> " Testing this to see how much space I can use" |
This file contains 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
MIKEs-MacBook-Air:micard mikeland$ heroku addons:add pgbackups -a micard | |
Adding pgbackups on micard... failed | |
! That add-on plan is already installed on micard. | |
MIKEs-MacBook-Air:micard mikeland$ heroku addons:add heroku-postgresql:hobby-basic -a micard | |
Adding heroku-postgresql:hobby-basic on micard... done, v243 ($9/mo) | |
Attached as HEROKU_POSTGRESQL_COPPER_URL | |
Database has been created and is available | |
! This database is empty. If upgrading, you can transfer | |
! data from another database with pgbackups:restore. | |
Use `heroku addons:docs heroku-postgresql` to view documentation. |
This file contains 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
1.9.3p362 :107 > s[/^.{9,16}\b/] | |
=> "one two three " | |
1.9.3p362 :108 > s[/^.{9,16}\w+/] | |
=> "one two three four" | |
1.9.3p362 :109 > s[/\w+.{,16}$/] | |
=> "four five six seven" | |
1.9.3p362 :110 > s[/\b.{,16}$/] | |
=> " five six seven" | |
1.9.3p362 :111 > s | |
=> "one two three four five six seven" |
OlderNewer