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 | |
# Downloads busybox to run vi on heroku | |
# Tested on heroku-16 | |
# Fetch the version of busybox in the alpine repository | |
VERSION=$(curl -s -L http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz | tar -xzOf - APKINDEX | grep -A 12 -B 1 "^P:busybox-static$" | grep "^V:" | cut -c3-) | |
# Download busybox-static from the alpinelinux repository and extract the binary into /app/bin | |
# if the download fails visit the repository to check if the filename has changed | |
# The Output: |
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
# BEGIN Server Maintenance | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^203\.0\.113\.10 | |
RewriteCond %{REQUEST_URI} !maintenance.html$ [NC] | |
RewriteRule . /maintenance.html [L] | |
</IfModule> | |
# END Server Maintenance |
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 | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2015 | |
# | |
# 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 |