- Code is under source control (git) with a remote I can read/write to
- Be aware of test coverage
- Code is under continuous integration
- The code has a known deployment process
| ;; emacs configuration | |
| (push "/usr/local/bin" exec-path) | |
| (setq make-backup-files nil) | |
| (setq auto-save-default nil) | |
| (setq-default tab-width 2) | |
| (setq-default indent-tabs-mode nil) | |
| (setq inhibit-startup-message t) | |
| (setq tramp-default-method "scpx") |
| CURRENT=`pwd` | |
| mkdir /tmp/repo_archive | |
| cd /tmp/repo_archive | |
| git clone --quiet --bare "$CURRENT" repository | |
| tar -c repository | pigz --best > "$CURRENT/archive.tar.gz" | |
| cd $CURRENT | |
| rm -rf /tmp/repo_archive |
| class ExifData | |
| require 'celluloid' | |
| def initialize(file) | |
| raise 'Expects Upload!' unless file.is_a?(Upload) | |
| @upload = file | |
| end | |
| def process! | |
| # this is fictitional |
| # Configuration Constants (move to yaml ?) | |
| HOST = 'ad01.domain.local' | |
| PORT = 636 | |
| USER = 'administrator' | |
| PASS = 'password' | |
| BASE = 'dc=domain, dc=local' | |
| DOMAIN = 'domain.local' | |
| SCOPE = '(&(objectCategory=person)(objectClass=user))' | |
| require 'rubygems' |
| #!/bin/bash | |
| # Mac Bootstrap Script | |
| # (C) 2011 - @codatory | |
| # | |
| # "It might work for you, too." | |
| pretty_echo(){ | |
| echo '--------------------------------' | |
| echo " $*" |
| whatismyip() { | |
| IP=`curl --silent http://ip.appspot.com/` | |
| echo "External IP: ${IP}" | |
| } |
| file = params[:csv].open | |
| chardet = CharDet.detect(file.read[0..200]) | |
| if chardet['confidence'] > 0.7 | |
| charset = chardet['encoding'] | |
| else | |
| raise 'Unable to detect file encoding' | |
| end | |
| csv = CSV.parse(Iconv.conv('ASCII//IGNORE//TRANSLIT',charset,file.open.read), :headers => true) |
| development: | |
| adapter: sqlite3 | |
| database: db/development.sqlite3 | |
| timeout: 5000 | |
| test: | |
| adapter: sqlite3 | |
| database: db/test.sqlite3 | |
| timeout: 5000 |
| Process: ruby [54093] | |
| Path: /Users/USER/*/ruby | |
| Identifier: ruby | |
| Version: ??? (???) | |
| Code Type: X86-64 (Native) | |
| Parent Process: bash [8695] | |
| Date/Time: 2011-08-23 17:24:42.402 -0400 | |
| OS Version: Mac OS X 10.7.1 (11B26) | |
| Report Version: 9 |