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
[16:44:51] Using gulpfile ~/polymer/gulpfile.js | |
[16:44:51] Starting 'wct:local'... | |
Starting Selenium server for local browsers | |
Selenium server running on port 40499 | |
Web server running on port 2000 and serving from ~/polymer | |
chrome 46 Beginning tests via http://localhost:2000/components/polymer/generated-index.html?cli_browser_id=0 | |
chrome 46 ✖ Test Suite Initialization | |
Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered. | |
<unknown> at <unknown> at /components/polymer/app/bower_components/polymer/polymer-micro.html:308:0 |
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
<test-fixture id="basic"> | |
<template> | |
<r-api path="api.widget.list"></r-api> | |
</template> | |
</test-fixture> | |
<dom-module id="fake-google-api"> | |
<template> | |
<iron-ajax id="widgetList" | |
auto |
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
def random_between_1_and_3 | |
(rand * 3).ceil | |
end | |
file = File.open('results.csv', 'w') | |
file.puts 'car, first_choice, expose, second_choice, win, switch, switch_and_win, stay_and_win' | |
1_000_000.times do |
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
# This Gist helps you analyze mysql slow query logs. | |
# This Ruby code should not be used as an example of tested, | |
# production ready, or idiomatic Ruby. You've been warned. | |
# 1. Download and extract slow logs. | |
# 2. Specify a directory to analyze, using Dir[] syntax: | |
DIRECTORY_TO_ANALYZE = "./mysql_slow_logs/2012/*/*/mysqld_slow.log" | |
# 3. Run the script with "ruby ./mysql_slow_log_parser.rb" |
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
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ git push heroku heroku:master | |
Counting objects: 14, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (8/8), done. | |
Writing objects: 100% (10/10), 906 bytes, done. | |
Total 10 (delta 6), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> WARNING: git submodule detected in: | |
vendor/plugins/squirrel |
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
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ git push heroku heroku:master | |
Everything up-to-date | |
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ heroku addons:add newrelic:bronze | |
Adding newrelic:bronze to dmssalaries... FAILED | |
! newrelic:bronze add-on already added. | |
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ |
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
before :all do | |
Report.make(:id => 1, :name => "some report for us") | |
Person.make(:id => 1) | |
Reports::Application.routes.draw do | |
match "/report_some_report_for_us" => "report#report_some_report_for_us", :as => :report_some_report_for_us | |
end | |
Rails.application.reload_routes! | |
end | |
it "route for every record" do | |
{:get => '/report_some_report_for_us'}.should route_to(:controller => 'report', :action => 'report_some_report_for_us') |
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
module Reporter #:nodoc: | |
module Routing #:nodoc: | |
module MapperExtensions | |
def reporter | |
@set.add_route("/reporter/:id", {:controller => "reports", :action => "show"}) | |
end | |
end | |
end | |
end | |
ActionController::Routing::RouteSet::Mapper.send :include, Reporter::Routing::MapperExtensions |
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
/home/bernie/.rvm/rubies/ruby-1.9.2-rc2/bin/ruby -rrubygems /home/bernie/.rvm/gems/ruby-1.9.2-rc2/gems/rspec-core-2.0.0.beta.19/bin/rspec /home/bernie/development/reports/vendor/plugins/reporter/spec/lib/reporter/models_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/lib/reporter_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/controllers/controller_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/routing/routing_spec.rb | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/formatters/helpers.rb:8: warning: already initialized constant SUB_SECOND_PRECISION | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/formatters/helpers.rb:9: warning: already initialized constant DEFAULT_PRECISION | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/metadata.rb:17: warning: already initialized constant RESERVED_KEYS | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/ |
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
#! /usr/bin/env ruby | |
# the following maps the protocol handler txmt to open a vim file | |
# For example, if you have a link in Firefox with this URL: | |
# | |
# txmt:///home/my_user/.../index.html.haml | |
# | |
# then you can use this script to open VIM in the to the | |
# corresponding file and line number. | |
# |
NewerOlder