Skip to content

Instantly share code, notes, and snippets.

View rjhancock's full-sized avatar
🏠
Working from home

Richard J Hancock rjhancock

🏠
Working from home
View GitHub Profile
@rjhancock
rjhancock / nginx.j2
Created April 18, 2024 00:04
Ansible Deployment Scripts
upstream {{ proxy_server }} {
server {{ proxy_server_url }} fail_timeout=0;
}
server {
listen 443 ssl http2 reuseport;
listen [::]:443 ssl http2 reuseport;
server_name {{ server_name }};
server_tokens off;
@rjhancock
rjhancock / line_endings_and_encoding_enforcement.rb
Created October 6, 2020 13:56
Convert CRLF -> LF and Enforce UTF-8 File Format
files = Dir['**/*.blk']
files += Dir['**/*.mtf']
files.each do |file|
puts "Checking file: #{file}"
raw = File.read(file)
# New Line Conversion from CRLF -> LF
data = raw.encode(raw.encoding, universal_newline: true)