Skip to content

Instantly share code, notes, and snippets.

@dmckeone
dmckeone / OpenSSLOnFreeBSD.md
Last active November 2, 2016 15:18
Keep OpenSSL updated on FreeBSD
@dmckeone
dmckeone / CanadaTallStores.txt
Last active September 15, 2015 18:12
Stores with Men's Tall Sizes (and shipping to Canada)
LL Bean: http://www.llbean.com/
American Eagle: http://www.ae.com/web/canada/store.jsp
J. Crew: https://www.jcrew.com/ca/index.jsp
Eddie Bauer: http://www.eddiebauer.com
Gap: http://www.gap.com
Macy's: http://www1.macys.com
Land's End: http://www.landsend.com
Banana Republic: http://bananarepublic.gap.com
Quicksilver: http://www.quiksilver.com
Columbia: http://www.columbiasportswear.ca

getting started with salt

a little adventurous tale of setting up salt on osx...

salt osx docs: http://goo.gl/E6ZtA

overall, seemed pretty straight forward...(?)

  • preliminary steps:
    • brew update (I did this to make sure I was up to date)
    • brew upgrade (I did this to upgrade what I was not up to date with)
  • brew doctor (I did this to make sure I was 'raring to brew')
@dmckeone
dmckeone / gist:69334e2d8b27f586414a
Last active February 11, 2023 15:28
Using virtualenv under PostgreSQL PL/Python

(All of this code tested in Enterprise DB PostgreSQL 9.4 Beta 1 and Python 3.3)

As of Virtualenv 1.3 (https://pypi.python.org/pypi/virtualenv) (and excluding Python 3.4's venv) there is an activate_this.py file within a virtualenv package that allows activation of a virtual environment within an embedded version of Python (like PostgreSQL's PL/Python). A Python 2/3 compatible version looks like this:

exec(open('/Some/VirtualEnv/Directory/myvirtualenv/bin/activate_this.py').read(), 
     dict(__file__='/Some/VirtualEnv/Directory/myvirtualenv/bin/activate_this.py'))

Where /Some/VirtualEnv/Directory is a directory and myvirtualenv is the name of the virtual environment in use. On Windows replace bin with Scripts.

@dmckeone
dmckeone / gist:da287e50b0449e2944fb
Created April 30, 2014 17:12
What we know in Computer Science
Inspired by this (http://carmandrew.com/home/2013/9/3/can-we-please-put-the-science-back-into-computer-science), this is a list of papers and summaries of what they say:
- Boehm (1975): most errors are introduced during requirements analysis and design. Not during writing and debugging. The later a bug is removed, the more it costs to remove.
- Woodfield (1979): For every 25% increase in problem complexity, there is a 100% increase in solution complexity. It's non-linear because of interaction effects.
- van Genuchten (1991): The two biggest causes of project failure are poor estimation and unstable requirements, neither of which seem to be improving in the industry as a whole.
- Thomas et al. (1997, but it hasn't been replicated yet): If more than 20-25% of a component has to be revised, it's better to rewrite it from scratch. (This study was done on software for flight avionics, so it may or may not generalize).
- Fagan (1975 at IBM): Hour for hour, sitting down and reading the code is the most effectiv
@dmckeone
dmckeone / gist:7518335
Last active December 28, 2015 14:59
Peekorator for Python 2/3
"""
Generic Peekorator, modeled after next(), for "looking into the future" of a generator/iterator.
ACKNOWLEDGEMENTS
-----------------
"plof" for the name: http://stackoverflow.com/a/10576559/589362
Ned Batchelder for the buffered __peek__: http://stackoverflow.com/a/1517965/589362
"""
def peek(peekorator, n=None, default=None):
@dmckeone
dmckeone / rt-n66u_tomatousb_flash.md
Last active June 7, 2016 21:25 — forked from joshenders/rt-n66u_tomatousb_flash.md
How to flash RT-N66U with Shibby's TomatoUSB firmware