Skip to content

Instantly share code, notes, and snippets.

@Golit
Golit / busybox-vi-heroku.sh
Last active January 12, 2019 22:45
Edit files on heroku with busybox vi
#!/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:
@Golit
Golit / .htaccess
Last active May 9, 2017 14:37 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
# 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
@Golit
Golit / tplink-reconnect.sh
Created February 5, 2015 04:52
This script will reconnect your TP-Link TL-WDR3600 router. The script works with the latest firmware