Skip to content

Instantly share code, notes, and snippets.

@tracker1
tracker1 / etc-network-interfaces
Created Feb 7, 2014
network config, multiple ips for a single interface.
View etc-network-interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
@tracker1
tracker1 / instructions.md
Last active Aug 29, 2015
Windows Command Prompt
View instructions.md
@tracker1
tracker1 / console-output
Last active Aug 29, 2015
Keys for etcd cluster
View console-output
> etcd -name="MICHAELR" --config=/etc/etcd/etcd-dev.conf
[etcd] Aug 4 17:40:59.669 CRITICAL | TLS info error: crypto/tls: private key does not match public key
@tracker1
tracker1 / git-commands.sh
Last active Aug 29, 2015
Useful Git Commands
View git-commands.sh
# update remote references ...
git fetch --all --prune
#force checkout to match origin/master with reset
# this cannot be undone
# best to make a branch first
git fetch origin
git reset --hard origin/master
View nginx-notes.md

config try_files with proxy_pass / proxy fallback for static content (listing.prod-classiccars.com)

  location ^~ / {
    try_files $uri $uri/ @proxyslash;
  }
  location @proxyslash {
    proxy_pass http://127.0.0.1:8080;
  }
@tracker1
tracker1 / bad_actor.aspx
Created Sep 17, 2014
IIS Bad Actor Blocking
View bad_actor.aspx
<%@ Page Language="C#" AutoEventWireup="true"%><!DOCTYPE html>
<%
// This code is required for host that do special 404 handling...
Response.Status = "403 Access Denied";
Response.StatusCode = 403;
Response.AddHeader("X-Robots-Tag", "noindex,noarchive"); //don't store this in any index
%><html>
<head>
<title>ClassicCars.com - Bad Request</title>
<style type="text/css">
@tracker1
tracker1 / you-suck.md
Last active Aug 29, 2015
Dear Cox Communications...
View you-suck.md

I think you, or someone else misplaced a decimal point!!! My bill for one month should NOT be nearly $1400

I am so sick and tired of dealing with your company.. both from the residential side and the business side. In the past two years, you left me without my business account for days (disconnected me at the old location 5 days before the scheduled install at the new location, that lost me over $3k), you have physically disconnected my line some 4 times now (each time through incompetence), you charged me for a service I had shut off for over a year, then screwed up the account credit for that (only 1/8 of what it was supposed to be)... and beyond all this, your residential side disconnected me 3 days after I had paid my bill and screwed up the accounts on that side, took four phone calls to actually shut it off (because the idiots couldn't find the right account), then physically disconnected the line again in spite of having a note not to since I had a business connection. And now, you send me a bi

View watch-scripts.task.js
gulp.task('watch-scripts', function() {
var watchify = require('watchify')
var util = require('gulp-util')
var source = require('vinyl-source-stream')
var watcher = watchify('./src/index.js')
var bundle = function() {
return watcher
.bundle({debug: true})
@tracker1
tracker1 / fizzbuzz.js
Created Dec 11, 2014
Fizz Buzz - JavaScript
View fizzbuzz.js
function fb(num) {
var fizz = !(num % 3) ? 'Fizz' : ''
,buzz = !(num % 5) ? 'Buzz' : '';
return fizz + buzz || num;
}
for (var i=1; i<101; i++) console.log(fb(i));