11th May 2019, 1700 hours
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
# Inspired from post from Ashok Nagraj | |
import random | |
import time | |
from flask import Flask, request, jsonify | |
from opentelemetry import metrics | |
from opentelemetry.sdk.metrics import MeterProvider | |
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader | |
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter | |
from opentelemetry.sdk.resources import SERVICE_NAME, SERVICE_NAMESPACE, SERVICE_VERSION, Resource |
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
import requests | |
import time | |
from prometheus_client import start_http_server | |
from prometheus_client.core import Gauge, GaugeMetricFamily, CounterMetricFamily, REGISTRY | |
APP_URL = "http://localhost:80/server-status/?auto" | |
def get_metrics(): | |
resp = requests.get(url=APP_URL) |
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
prathamesh at Prathameshs-MacBook-Pro in ~/Projects/sources/activerecord-jdbc-adapter on master [$] | |
$ java -version | |
java version "1.8.0_05" | |
Java(TM) SE Runtime Environment (build 1.8.0_05-b13) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) | |
prathamesh at Prathameshs-MacBook-Pro in ~/Projects/sources/activerecord-jdbc-adapter on master [$] | |
$ bundle exec rake appraisal:rails42 | |
>> BUNDLE_GEMFILE=/Users/prathamesh/Projects/sources/activerecord-jdbc-adapter/gemfiles/rails42.gemfile bundle exec /Users/prathamesh/.rbenv/versions/jruby-1.7.19/bin/rake |
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
inherit_from: .rubocop_todo.yml | |
require: | |
- rubocop-rspec | |
- rubocop-rails | |
- rubocop-performance | |
AllCops: | |
EnabledByDefault: true | |
TargetRubyVersion: 2.6.5 |
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
inherit_from: .rubocop_todo.yml | |
require: | |
- rubocop-rspec | |
- rubocop-rails | |
- rubocop-performance | |
AllCops: | |
EnabledByDefault: true | |
TargetRubyVersion: 2.6.5 |
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
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum install jenkins | |
sudo service jenkins start/stop/restart | |
sudo service jenkins start | |
sudo usermod -s /bin/bash jenkins | |
sudo usermod -m /var/lib/jenkins jenkins | |
sudo su - jenkins | |
curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled | |
vi /var/lib/jenkins/.bashrc |
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
{ | |
"admin.js": "/packs/js/admin-67dd60bc5c69e9e06cc3.js", | |
"admin.js.map": "/packs/js/admin-67dd60bc5c69e9e06cc3.js.map", | |
"application.js": "/packs/js/application-d351b587b51ad82444e4.js", | |
"application.js.map": "/packs/js/application-d351b587b51ad82444e4.js.map", | |
"entrypoints": { | |
"admin": { | |
"js": [ | |
"/packs/js/admin-67dd60bc5c69e9e06cc3.js" |
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 configuration was generated by | |
# `rubocop --auto-gen-config` | |
# on 2019-09-11 08:43:14 +0530 using RuboCop version 0.74.0. | |
# The point is for the user to remove these configuration records | |
# one by one as the offenses are removed from the code base. | |
# Note that changes in the inspected code, or installation of new | |
# versions of RuboCop, may require this file to be generated again. | |
# Offense count: 1 | |
# Cop supports --auto-correct. |
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
(define (square x) | |
(* x x)) | |
(define (sum-of-squares a b) | |
(+ (square a) (square b))) | |
(define (sum-of-squares-of-two-largest a b c) | |
(if (>= a b) | |
(sum-of-squares a (max b c)) | |
(sum-of-squares b (max a c)) |
NewerOlder