Skip to content

Instantly share code, notes, and snippets.

@clhynfield
clhynfield / date-range.js
Created December 5, 2014 20:43
Generate a range of dates (js)
// Generate a range of dates
// http://stackoverflow.com/a/24707500/3585706
var dateA = new Date(2014,6,1,0,0,0);
var dateB = new Date(2014,6,4,0,0,0);
for(var myDate = dateA; myDate <= dateB; myDate = new Date(myDate.getTime() + 1000 * 60 * 60 * 24))
{
var formatedDate = myDate.getMonth()+1;
formatedDate += "/" + myDate.getDate() + "/" + myDate.getFullYear();
console.log(formatedDate);
@clhynfield
clhynfield / git-clone-fork.sh
Last active August 29, 2015 14:11
git-clone-github-fork.sh
#!/bin/sh
clone_user='clhynfield'
upstream_uri="$1"
upstream_repo="${upstream_uri##*/}"
upstream_user_uri="${upstream_uri%/$upstream_repo}"
upstream_user="${upstream_user_uri##*/}"
upstream_base="${upstream_user_uri%/$upstream_user}"
local_repo="${upstream_repo%.git}"
@clhynfield
clhynfield / hack-atom-core.sh
Last active August 29, 2015 14:11
hack-atom-core.sh
#!/bin/sh
git clone https://github.com/clhynfield/find-and-replace.git
cd find-and-replace
git remote add upstream https://github.com/atom/find-and-replace.git
git fetch upstream master:upstream
git branch --set-upstream-to=upstream/master upstream
git checkout master
# From https://atom.io/docs/v0.158.0/contributing-to-packages
#!/bin/sh
# unset http_proxy
brew install nvm
echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.profile_local
. ~/.profile_local
nvm ls-remote
nvm install 0.10.35
npm install -g yo bower grunt karma mocha
npm install -g less

NoOps? Try generalizing specialists instead

//TODO - work in progress

A few years ago I started noticing the term "NoOps" gaining in popularity among well-respected IT folks. Forrester analyst Mike Gualtieri called for NoOps in 2011, and Adrian Cockcroft, whom I know and respect from my days as a Sun sys admin, re-coined the term NoOps in 2012. Perhaps some folks are really looking to cut Ops out of the picture; but what I think most are looking for, and what would serve self-hosting cloud shops best, is to pivot the way that development and operations work together.

In 1997, it took a host of teams with serious technical chops to rack and stack, configure and maintain a data center full of switches, storage, and servers, and often the deployment of one application, let alone a tightly coupled domain of apps, bordered on wizardry. Today,

MEAN Quick Start

Initialize Project

git init
# create .gitignore, LICENSE, README
git add .gitignore LICENSE README
git commit -m 'Create project'
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
// http://stackoverflow.com/a/3540295
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
// some code..
}
@clhynfield
clhynfield / logstash.conf
Created April 5, 2015 06:58
Docker logstash config
input {
udp {
port => 8514
}
tcp {
port => 8514
}
stdin {