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
function mamp() { | |
# | |
# Default location of the apache conf file for MAMP | |
CONF_FILE="/Applications/MAMP/conf/apache/httpd.conf" | |
# | |
# Fish existing doc root out of conf file | |
LINE=$(cat $CONF_FILE | grep "^DocumentRoot") | |
QUOTED_STRING=${LINE/DocumentRoot /} | |
OLD_DOC_ROOT=${QUOTED_STRING//\"/} | |
# |
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
require 'rufus/scheduler' | |
scheduler = Rufus::Scheduler.start_new | |
if Rails.env.production? | |
scheduler.every '10m' do | |
require "net/http" | |
require "uri" | |
Net::HTTP.get_response(URI.parse(ENV["HOSTNAME"])) | |
end | |
end |
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
#!/usr/bin/env node | |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { |