Skip to content

Instantly share code, notes, and snippets.

View shad1w's full-sized avatar

Michael G. shad1w

View GitHub Profile
@shad1w
shad1w / LICENSE
Created August 7, 2018 09:22
Datastruct: A simple data structure markup language for prototyping
MIT License
Copyright (c) 2018 by shad1w (Michael G.)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@shad1w
shad1w / ChangeLineEndings.groovy
Last active April 23, 2021 19:37
Gradle change line endings
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
class ChangeLineEndings extends DefaultTask {
static final String CRLF = "\r\n"
static final String LF = "\n"
static final String CR = "\r"
private filePaths = []
private String newEnding = LF
@shad1w
shad1w / rails_subdir_deploy.md
Last active January 23, 2023 07:32
Deploying a rails application in a subdirectory

Making a Rails application deployable in a subdirectory

USE THIS GUIDE AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR ANYTHING YOU DO BY FOLLOWING THIS GUIDE! IF ANY DAMAGE IS DONE BY FOLLOWING THE INSTRUCTIONS HERE, IT IS ENTIRELY YOUR RESPONSIBILITY AND I MAY NOT BE HELD LIABLE FOR IT!

Using this guide, you can make it possible to put your Ruby on Rails application behind a reverse proxy in a subdirectory.
This guide was written for Rails 5.

Prerequisites

Using this method, the environment variable RAILS_RELATIVE_URL_ROOT should not be set.