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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.0.1' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
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
--- ext/openssl/ossl.c | |
+++ ext/openssl/ossl.c | |
@@ -1048,6 +1048,7 @@ Init_openssl() | |
*/ | |
/* CRYPTO_malloc_init(); */ | |
/* ENGINE_load_builtin_engines(); */ | |
+ OPENSSL_config(NULL); /* Makes Ruby respect system OpenSSL config */ | |
OpenSSL_add_ssl_algorithms(); | |
OpenSSL_add_all_algorithms(); | |
ERR_load_crypto_strings(); |
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
#!/bin/sh | |
usage() { | |
echo "DNS Master DynDNS update script. Updates A and/or AAAA records with public IPs that you have on your interfaces." | |
echo "Usage: $0 -h hostname[,hostname…] -u username -p password" | |
} | |
if [ $# -eq 0 ]; then usage; exit 1; fi | |
USERNAME="" |
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
AllCops: | |
TargetRubyVersion: 2.5 | |
Style/AsciiComments: | |
Enabled: false | |
Metrics/LineLength: | |
Max: 120 |
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
FROM nginx:stable-alpine | |
COPY default.conf /etc/nginx/conf.d/default.conf | |
COPY maintenance.html /usr/share/nginx/html/ |
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
#!/bin/bash | |
# | |
# Script for managing videostreaming over LAN with logging and GUI notifications. | |
# | |
# Dependencies: tstools libnotify-bin | |
# | |
# 2012, Novikov «Envek» Andrey. Use it freely under the MIT license. | |
# Configuration | |
MULTICASTADDR=224.0.0.1 # Target IP for streaming (from multicast range) |
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
# Example of custom PostgreSQL composite type support | |
# Works with Rails 6.0, also should work with Rails 5.2 | |
# Place this file to config/initializers/ | |
gem "money" | |
require "money" | |
# Subclass Money class just to get pretty output in rails console | |
class TrueMoney < Money | |
def inspect |
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 | |
# Example of how to launch separate process to export all metrics from Ruby processes on the same host/container. | |
# IMPORTANT: | |
# You MUST configure Direct File store in official Prometheus Ruby client for this to work. | |
# See https://github.com/yabeda-rb/yabeda-prometheus#multi-process-server-support | |
# Example of configuration that should be made for additional process to export all metrics | |
# Here: export Sidekiq metrics from not worker process. See https://github.com/yabeda-rb/yabeda-sidekiq#configuration |
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
#!/bin/sh | |
usage() { | |
echo "Android application copy from one device to another via ADB APK files copy (requires USB debugging to be enabled)" | |
echo "Usage: $0 <application_id> [application_id…]" | |
echo "Example: $0 jp.naver.line.android" | |
} | |
if [ $# -eq 0 ]; then usage; exit 1; fi | |
if [ "$1" = '--help' ]; then usage; exit 0; fi |
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
# Full list of Russian Federation time zones with helper to get this list. | |
# Place this file in config/initializers/timezones.ru.rb | |
class ActiveSupport::TimeZone | |
@country_zones = ThreadSafe::Cache.new | |
def self.country_zones(country_code) | |
code = country_code.to_s.upcase | |
@country_zones[code] ||= | |
TZInfo::Country.get(code).zone_identifiers.select do |tz_id| |