Skip to content

Instantly share code, notes, and snippets.

That worked!

Dominik dommmel

That worked!
View GitHub Profile
dommmel / mamp_function
Last active Mar 24, 2018 — forked from jonathanstark/mamp_function
Serve the current directory with MAMP from the command line
View mamp_function
function mamp() {
# Default location of the apache conf file for MAMP
# Fish existing doc root out of conf file
LINE=$(cat $CONF_FILE | grep "^DocumentRoot")
QUOTED_STRING=${LINE/DocumentRoot /}
View task_scheduler.rb
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
if Rails.env.production?
scheduler.every '10m' do
require "net/http"
require "uri"
dommmel / static_server.js
Last active Aug 1, 2018 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
#!/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) {