Skip to content

Instantly share code, notes, and snippets.

View snehaso's full-sized avatar

Sneha Somwanshi snehaso

  • Thoughtworks
  • London, UK
View GitHub Profile
@snehaso
snehaso / browser_logging.rb
Created July 8, 2020 16:12 — forked from zdennis/browser_logging.rb
Chromedriver browser logging for Capybara
# browser_logging.rb will print out the browser log from Chrome
# when running specs with "js: true". This is so we can easily debug
# issues where there are JS errors or other console warnings/error(s), etc.
#
# Output file is: Rails.root/log/browser.log
#
# Note: Nothing will be printed out for non-JS examples.
RSpec.configure do |config|
browser_log = File.new(Rails.root.join("log/browser.log").to_s, "w")
browser_log.sync = true
ubuntu@ip-10-130-214-252:~/workspace/fac/freeagent$ bundle install --verbose
Running `bundle install --verbose` with bundler 2.0.2
Found changes from the lockfile, re-resolving dependencies because the list of sources changed
HTTP GET https://index.rubygems.org/versions
Net::OpenTimeout: Net::OpenTimeout
/home/ubuntu/.rubies/ruby-2.6.5/lib/ruby/2.6.0/net/protocol.rb:41:in `ssl_socket_connect'
/home/ubuntu/.rubies/ruby-2.6.5/lib/ruby/2.6.0/net/http.rb:996:in `connect'
/home/ubuntu/.rubies/ruby-2.6.5/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
/home/ubuntu/.rubies/ruby-2.6.5/lib/ruby/2.6.0/net/http.rb:925:in `start'
/home/ubuntu/.gem/ruby/2.6.5/gems/bundler-2.0.2/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:702:in `start'
#!/usr/bin/env ruby
host = ARGV.shift || "user:token@freeagent.jfrog.io/freeagent/api/gems/gems/"
require 'uri'
require 'net/http'
begin
require 'openssl'
rescue LoadError
[sneha-somwanshi@smartos-slave-d25-ash:~]$ sudo dtrace -qn 'syscall::write:entry, syscall::sendto:entry /pid == $target/ { printf("(%d) %s %s", pid, probefunc, copyinstr(arg1)); }' -p 58331
(58331) write (58331) write (58331) write (58331) write (58331) write (58331) write (58331) write (58331) write (function(program, execJS) { execJS(program) })(function(global, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { var global = this;(function(f){if(typeof exports==="object"(58331) write (58331) write (58331) write (58331) write (58331) write (58331) write (58331) write xu����<f7"� ��ā��$��?ۻ�6Kv��'ql�o�B�S�]=SqwWSU=�a���'��$N�pB��rȅB �p͉�gz���k썂�]�T�zU�~�����s�/�ϥ��f��E�C�V*4I*T)�UE�Q�T��gMC*9��>�<�Q��D�X���ԛz����
�׹�՗�jm�[�<vc�F�//��
~�F���T�]���B���b׻^_�Vi�׽�ʘG/��(58331) writeI"�app/assets/stylesheets/talaria/themes/simple_print.scss?type=text/css&pipeline=self&id=e25c019b2d33ce851a79322
This file has been truncated, but you can view the full file.
Channel reader thread: smartos-slave-d01-ash
"Channel reader thread: smartos-slave-d01-ash" Id=2341 Group=main WAITING on com.trilead.ssh2.channel.Channel@48dfaf22
at java.lang.Object.wait(Native Method)
- waiting on com.trilead.ssh2.channel.Channel@48dfaf22
at java.lang.Object.wait(Object.java:502)
at com.trilead.ssh2.channel.FifoBuffer.read(FifoBuffer.java:212)
at com.trilead.ssh2.channel.Channel$Output.read(Channel.java:127)
at com.trilead.ssh2.channel.ChannelManager.getChannelData(ChannelManager.java:933)
at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:58)
at com.trilead.ssh2.channel.ChannelInputStream.read(ChannelInputStream.java:79)
2019-07-24T10:51:48.596Z] Alert rules: ...F HTML screenshot: /mnt/ramdisk/workspace/fac/freeagent/log/capybara/screenshot_Inline_Banking_-_Credit_Note_Refunds_explaining_a_transaction_as_a_credit_note_refund_2019-07-24-10-50-28.212.html
[2019-07-24T10:51:48.596Z] Image screenshot: /mnt/ramdisk/workspace/fac/freeagent/log/capybara/screenshot_Inline_Banking_-_Credit_Note_Refunds_explaining_a_transaction_as_a_credit_note_refund_2019-07-24-10-50-28.212.png
[2019-07-24T10:51:48.596Z] F HTML screenshot: /mnt/ramdisk/workspace/fac/freeagent/log/capybara/screenshot_Inline_Banking_-_Credit_Note_Refunds_displaying_a_message_when_no_matching_credit_note_could_be_found_2019-07-24-10-50-52.779.html
[2019-07-24T10:51:48.596Z] Image screenshot: /mnt/ramdisk/workspace/fac/freeagent/log/capybara/screenshot_Inline_Banking_-_Credit_Note_Refunds_displaying_a_message_when_no_matching_credit_note_could_be_found_2019-07-24-10-50-52.779.png
[2019-07-24T10:51:48.596Z] F HTML screenshot: /mnt/ramdisk/workspace/fac/freea
^C~/dev/freeagent (aws/chrome *) $ ./node_modules/karma/bin/karma start config/karma.conf.js --browsers=Chrome --single-run=false
23 07 2019 10:27:20.582:DEBUG [config]: Loading config /Users/snehasomwanshi/dev/freeagent/config/karma.conf.js
23 07 2019 10:27:20.587:DEBUG [karma-server]: Final config Config {
LOG_DISABLE: 'OFF',
LOG_ERROR: 'ERROR',
LOG_WARN: 'WARN',
LOG_INFO: 'INFO',
LOG_DEBUG: 'DEBUG',
frameworks: [ 'jasmine', 'fixture' ],
protocol: 'http:',
@snehaso
snehaso / gist:f0ee891826241f31194f
Created January 19, 2015 16:46
cloudformation.json
"usEast1bPublic": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"VpcId": {
"Ref": "VPC"
},
"CidrBlock": "10.0.0.0/24",
"AvailabilityZone": "us-east-1b"
}
},
resource "aws_instance" "nat" {
ami = "${var.aws_nat_ami}"
availability_zone = "us-east-1b"
instance_type = "m1.small"
key_name = "${var.aws_key_name}"
security_groups = ["${aws_security_group.nat.id}"]
subnet_id = "${aws_subnet.us-east-1b-public.id}"
associate_public_ip_address = true
source_dest_check = false
}
require 'vcloud'
module Vcloud
module EdgeGateway
module ConfigurationGenerator
class LoadBalancerService
def generate_config(input_config)
output_config = {}