By default RAILS_RELATIVE_URL_ROOT
is used only for asset pipeline.
To namespace your rails routes you need to wrap run MyApp::Application
with map
in your config.ru:
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
--- | |
# | |
# This template example assumes a UserPool and UserPoolDomain exist. | |
# The function of this is to produce a custom resource with an attribute | |
# that can be referenced for DNSName of an Route53::RecordSet AliasTarget. | |
# | |
# AliasTarget: | |
# HostedZone: Z2FDTNDATAQYW2 | |
# DNSNAME: !GetAtt UPDomain.CloudFrontDistribution |
/* | |
MIT License | |
Copyright (c) 2017 Martin Buberl | |
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 |
library(dplyr) | |
library(purrr) | |
#### setup #### | |
tbl <- tibble( | |
id = 1:25 | |
) |
import boto3 | |
import certbot.main | |
import datetime | |
import os | |
import raven | |
import subprocess | |
def read_and_delete_file(path): | |
with open(path, 'r') as file: | |
contents = file.read() |
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos | |
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423 | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
# (if you're backing up a user's repos instead, this should be your GitHub username) | |
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at | |
# https://docs.vagrantup.com. |
# lib/models/datastream.rb | |
class CHODatastream < ActiveFedora::NtriplesRDFDatastream | |
property :title, predicate: RDF::DC.title | |
property :creator, predicate: RDF::DC.creator | |
property :date, predicate: RDF::DC.date | |
property :location, predicate: RDF::DC.spatial | |
end |
#!/bin/bash | |
show_usage () { | |
echo "Usage: `basename $0` [START [END]]" | |
echo | |
echo "Steps through the commit history from START to END," | |
echo "then returns to the branch or commit from before execution." | |
echo | |
echo "START defaults to the root commit (beginning of history)." | |
echo "END defaults to current branch/commit." |
urlencode() { | |
# urlencode <string> | |
old_lc_collate=$LC_COLLATE | |
LC_COLLATE=C | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:$i:1}" | |
case $c in |