This file contains hidden or 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/ruby | |
## Jenkins log extractor | |
# | |
# Script iterates over the Jenkins log index file searching for log offsets matching the specified node ID. | |
# When a match is found the specified portion of the interleaved Jenkins log is streamed to STDOUT | |
# | |
# Example usage: | |
# jenkins_log_splitter /var/lib/jenkins/jobs/my_job/master/build/7/log 123 | |
# |
This file contains hidden or 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" } | |
# gem "rails", github: "rails/rails", branch: 'v6.0.2.2' |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://github.com/CreateJS/EaselJS/releases/download/0.8.1/easeljs-0.8.1.min.js"></script> | |
</head> | |
<body style="display: flex"> | |
<canvas id="canvas" width='800' height='800' style="border: 1px solid black; display: inline-block"></canvas> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body style="display: flex"> | |
<canvas id="canvas" width='800' height='800' style="border: 1px solid black; display: inline-block"></canvas> | |
<div id="log" style="border: 1px solid green; width: 800px; height: 800px; display: inline-block; overflow: hidden"></div> |
This file contains hidden or 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 'omniauth/strategies/<your strategy>' | |
require_relative 'omniauth_authenticity_checker' | |
OmniAuth.config.allowed_request_methods = [:post] | |
OmniAuth.config.before_request_phase = OmniauthAuthenticityChecker.new(reaction: :drop_session) | |
# And if you haven't already, you should be loading in the `Rack::Protection` middleware: | |
use Rack::Protection, reaction: :drop_session, use: :authenticity_token |
This file contains hidden or 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 'securerandom' | |
$test_db_name = "test_#{SecureRandom.rand(10_000)}.db" | |
puts "Using #{$test_db_name} database" | |
# Let's make sure it definitely doesn't exist | |
File.delete $test_db_name if File.exist? $test_db_name |
This file contains hidden or 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 'securerandom' | |
$test_db_name = "test_#{SecureRandom.rand(10_000)}.db" | |
puts "Using #{$test_db_name} database" | |
# Let's make sure it definitely doesn't exist | |
File.delete $test_db_name if File.exist? $test_db_name |