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 bash | |
set -euo pipefail | |
USAGE="Usage: $(basename "$0") ISSUE_ID | |
Fetches all events for an issue, page by page. | |
At any time you feel you've retrieved enough events, use CTRL-C to stop | |
fetching. |
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
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. | |
gem "activerecord", "~> 7.0.0" | |
gem "sqlite3" |
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
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "caxlsx" | |
gem "benchmark" | |
end | |
require "axlsx" |
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
$ ./src/curl -v -D - --max-time 240 --output /dev/null --silent --show-error --stderr - --write-out 'Timings: NL%{time_namelookup} C%{time_connect} AC%{time_appconnect} PT%{time_pretransfer} R%{time_redirect} ST%{time_starttransfer} TT%{time_total}\n' 'https://mypdfresume.com/' | |
* STATE: INIT => CONNECT handle 0x55cf974c8f98; line 1418 (connection #-5000) | |
* Added connection 0. The cache now contains 1 members | |
* Trying 45.55.23.92... | |
* TCP_NODELAY set | |
* STATE: CONNECT => WAITCONNECT handle 0x55cf974c8f98; line 1470 (connection #0) | |
* Connected to mypdfresume.com (45.55.23.92) port 443 (#0) | |
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x55cf974c8f98; line 1587 (connection #0) | |
* Marked for [keep alive]: HTTP default |
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
Running with n of 1000000 | |
user system total real | |
slash: 0.170000 0.010000 0.180000 ( 0.164066) | |
plus: 0.430000 0.000000 0.430000 ( 0.439272) | |
interpolate: 0.170000 0.000000 0.170000 ( 0.161643) |
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
require 'lib/gherkin_html_formatter' | |
require 'gherkin/parser/parser' | |
require 'stringio' | |
require 'multi_json' | |
# This example reads a couple of features and outputs them as JSON. | |
io = StringIO.new | |
formatter = Gherkin::Formatter::HtmlFormatter.new(io, true) | |
parser = Gherkin::Parser::Parser.new(formatter) |
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 UIHelper | |
def box(title=nil, opts={}, &block) | |
title = "<h4>#{title}</h4>".html_safe if title | |
body = content_tag(:span, with_output_buffer(&block), :class => 'content') | |
box_class = @management ? 'well' : 'box' | |
opts[:class] = "#{box_class} #{opts[:class]}".squish | |
content_tag(:div, title + body, opts).html_safe |
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
class CalendarInput < Formtastic::Inputs::StringInput | |
def to_html | |
input_wrapping do | |
label_html << | |
builder.text_field(method, input_html_options) | |
end | |
end | |
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
namespace :heroku do | |
desc "Update .gems with a list of the required gems" | |
task :gems => 'gems:base' do | |
gem_lines = [] | |
gem_array = Rails.configuration.gems.reject{|g| g.frozen? && !g.framework_gem?}.map do |gem| | |
line = gem.name | |
line += " --source #{gem.source}" if gem.source | |
line += " --version '#{gem.requirement.to_s}'" if gem.requirement | |
gem_lines << line |