Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// ==UserScript== | |
// @name SludgeHammer | |
// @namespace gamerswithjobs | |
// @description Replaces marketing speak with English | |
// @exclude /github/ | |
// @author Chris Doggett | |
// ==/UserScript== | |
// Special thanks to Jeremy Banks at http://stackoverflow.com/a/6834930/64203 | |
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})}; |
#!/usr/bin/env ruby | |
# Helpful link: http://httpd.apache.org/docs/2.4/logs.html | |
require 'date' | |
line_count = 0 | |
File.open(ARGV[0]).readlines.each do |line| | |
line_count += 1 | |
result = /^(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).*\[(.*)\].*(GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT)\s(.*)\"\s(\d+)\s(\d+)(.*)$/.match(line) |