Skip to content

Instantly share code, notes, and snippets.

Evan Meagher evnm

Block or report user

Report or block evnm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evnm
evnm / gist:5695408
Last active Dec 18, 2015
Notes on Steve McConnell's "Managing Technical Debt" keynote presentation at the 2013 International Workshop on Managing Technical Debt
View gist:5695408

Slides: http://www.sei.cmu.edu/community/td2013/program/upload/TechnicalDebt-ICSE.pdf

Business vs Technical viewpoints

  • Business staff tends to be optimistic about debt
  • Technical staff tends to be pessimistic about debt (religious and aesthetic)
  • These attitudes are often not conscious
  • Debt is a tool, neither inherently good nor bad

Short- vs Long-term debt

  • Short: violating coding standards, "we'll write these unit tests after we ship"
@evnm
evnm / gist:2127168
Created Mar 19, 2012 — forked from marcel/gist:2100703
giftube – Generates an animated gif from a YouTube url.
View gist:2127168
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
@evnm
evnm / app.js
Created Oct 30, 2011
A Node.js daemon for achieving TTL behavior of files within a Dropbox directory
View app.js
var Log = require('log'),
log = new Log('info'),
DropboxClient = require('dropbox').DropboxClient,
dropbox = new DropboxClient("api_key", "api_secret",
"access_token", "access_token_secret");
/**
* Returns a function that checks the mtime of all files within dir
* and deletes any that are older than ttl.
*/
function checkForAndRmExpiredItems(dir, ttl) {
View gist:1323401
Programming, when stripped of all the circumstantial irrelevancies
is nothing more and nothing less than "very effective thinking
so as to avoid unmastered complexity, to very vigorous
separation of your many different concerns".
-- Edsger Dijkstra
@evnm
evnm / brew-install-missing-unix-tools
Created Oct 24, 2011
A brew command to install useful tools missing from Mac OS X
View brew-install-missing-unix-tools
# Legitimately-useful utilities missing from OS X.
brew install wget watch gnu-sed coreutils
# Up-to-date versions of included tools.
brew install git emacs
# Just for fun.
brew install fortune cowsay
@evnm
evnm / array-sum-example
Created Sep 24, 2011
Java vs Scala array sum example
View array-sum-example
// Java.
int sum = 0;
for (int i = 0; i < arr.length; i++) {
sum += arr[i];
}
System.out.println(sum);
// Scala (ignoring arr.sum).
println(arr reduceLeft { _ + _ })
View gist:1164076
[alias]
crunk = checkout -b regrettable-late-night-coding-session
@evnm
evnm / gist:1143421
Created Aug 13, 2011
My new screensaver
View gist:1143421
yes 123482736951872309587349057348056239146823756892376589237469236759034285709238470192384723975634895763894567981234902042387509324875093246709126374093476509137649023187409213865092386549034137849127340983729084172309487129037490182374901823740981273094817239041234740213 | lolcat
View rename-file-and-buffer.el
;; Originally from stevey, adapted to support moving to a new directory.
;; http://stackoverflow.com/questions/384284/can-i-rename-an-open-file-in-emacs
(defun rename-file-and-buffer (new-name)
"Renames both current buffer and file it's visiting to NEW-NAME."
(interactive
(progn
(if (not (buffer-file-name))
(error "Buffer '%s' is not visiting a file!" (buffer-name)))
(list (read-file-name (format "Rename %s to: " (file-name-nondirectory
(buffer-file-name)))))))
@evnm
evnm / file-browser-with-dropbox-node-0.2.0.js
Created Jan 11, 2011
Updated version of file browser demo using dropbox-node v0.2.0.
View file-browser-with-dropbox-node-0.2.0.js
var sys = require('sys')
, DropboxClient = require('dropbox').DropboxClient
, express = require('express')
, app = express.createServer()
, consumer_key = '85m56oj9a6ekr1k'
, consumer_secret = 'kirag26pr0pbf3z'
app.configure(function () {
app.use(express.logger())
app.use(express.bodyDecoder())
You can’t perform that action at this time.