Skip to content

Instantly share code, notes, and snippets.

View tracker1's full-sized avatar

Michael J. Ryan tracker1

View GitHub Profile
@tracker1
tracker1 / instructions.md
Last active August 29, 2015 14:04
Windows Command Prompt
@tracker1
tracker1 / .bashrc
Created July 23, 2014 23:05
Git Bash Shell startup for automatic ssh-agent running
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
@tracker1
tracker1 / console-output
Last active August 29, 2015 14:04
Keys for etcd cluster
> 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 August 29, 2015 14:05
Useful Git Commands
# 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
@tracker1
tracker1 / ie8-shims.md
Last active December 16, 2015 21:50
IE8 Shims (react-bootstrap)

Edit: Possibly a better option for all browsers.

<script src="//cdn.polyfill.io/v2/polyfill.min.js?features=es5,es6,es7,Promise,fetch,html5-elements,viewport&flags=gated"></script>

IE8 Shims

Below are the shims I'm currently using for a React app in conjunction with Bootstrap (react-bootstrap)

@tracker1
tracker1 / nginx-notes.md
Created September 11, 2014 16:47
nginx notes

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 September 17, 2014 19:08
IIS Bad Actor Blocking
<%@ 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 August 29, 2015 14:07
Dear Cox Communications...

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

@tracker1
tracker1 / 01-directory-structure.md
Last active April 15, 2024 13:58
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@tracker1
tracker1 / watch-scripts.task.js
Created October 28, 2014 01:09
watchify gulp
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})